Open jelovac opened 5 hours ago
Figured it out. We run the build task through turbo(repo). And turbo by default excludes all environment variables which are not explicitly stated or match common JS frameworks patterns.
See:
Currently BUILD_ID = github.run_id
If we set BUILD_ID as a globalenv it will always cause a cache miss, which will make caching useless.
If we set BUILD_ID as a globalpassthroughenv it will not cause a cache miss. However, it might make a confusion. Because the ID will be the id of some previous job which got cached. Not a good solution either..
Time to sleep on it.
Description
The BUILD_ID environment variable is not passed to the Rollup node process which builds and bundles
phunt-cli
. As a result when we run the version command the BUILD_ID will display unknown.TODO
Test case
BUILD_ID=123 pnpm build
By design if the env variable is set rollup's plugin replace should set BUILD_ID.
Relevant files