Know commit hash of running worker
When the worker is deployed I would like to have a way for the worker to know what is the commit version that was used to build/ship it. Kind of like having an env var that stores the output of
git rev-parse HEAD that i can just reference in the worker's code itself.1 Reply
i can add
--var GIT_HASH:$(git rev-parse HEAD) to the dev and deploy commands. the issue is now typescript has no idea this var exists
i could define it in vars in the config with the --strict-vars false flag but idk, seem not ideal
ended up just making my own d.ts file