-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package version from env instead of package.json #12139
Conversation
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #12139 +/- ##
==========================================
+ Coverage 75.53% 76.28% +0.75%
==========================================
Files 334 429 +95
Lines 13981 16138 +2157
Branches 2936 3254 +318
==========================================
+ Hits 10560 12311 +1751
- Misses 3200 3581 +381
- Partials 221 246 +25 see 95 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@@ -75,12 +75,12 @@ function getPackageJsonFields(): { | |||
const content = readFileSync(packageJsonFile!, "utf-8") | |||
const parsedContent = JSON.parse(content) | |||
return { | |||
VERSION: parsedContent.version, | |||
VERSION: process.env.VERSION || parsedContent.version, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will use the env variable version if set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
Reading package version from environment instead of relying on the package.json for the docker images V2. As we don't have npm repo dependencies anymore, the package.json will always have 0.0.0.
This will only apply to the new images, currently only used in QA
Related: https://github.com/Budibase/budibase-deploys/pull/134