-
-
Notifications
You must be signed in to change notification settings - Fork 917
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
Adding version details to the PWA #3606
Conversation
AUTOMERGE: (FAIL)
|
This comment has been minimized.
This comment has been minimized.
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.
Do we need this in gulpfile if this versioning is only used in web version?
Another way to do it would be to inject env variables into this the build in vite then use import.meta.env
to read those out. That would remove need to create that extra file.
Agree. I think the original idea was better, and simply needed the global variables (introduced by Vite definitions) to be marked as readonly. |
Removing whitespace
This comment has been minimized.
This comment has been minimized.
@haslinghuis will need someone with SonarCloud access to either give me access or review the security issue (doesn't like git on the path). |
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
define: { | ||
'__APP_VERSION__': JSON.stringify(pkg.version), | ||
'__APP_PRODUCTNAME__': JSON.stringify(pkg.productName), | ||
'__APP_REVISION__': JSON.stringify(childProcess.execSync("git rev-parse --short HEAD").toString().trim()), |
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.
The issue is sonarcloud wants the full path to git. It doesn't like that I've let the system search for it... it can just be reviewed as 'safe'.
Do you want to test this code? Here you have an automated build: |
* Adding version details to the PWA * Created a coded version.js that can be loaded as a module. * Reverting, and simply identifying the permissible global vars for Vite * Update .eslintrc.js Removing whitespace * Update vite.config.js
Not sure if this is the right way to go about it...