Skip to content
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

Merged
merged 5 commits into from
Oct 17, 2023

Conversation

blckmn
Copy link
Member

@blckmn blckmn commented Oct 14, 2023

Not sure if this is the right way to go about it...

@blckmn blckmn requested a review from chmelevskij October 14, 2023 07:03
@blckmn
Copy link
Member Author

blckmn commented Oct 14, 2023

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> FAIL
  • assigned to a milestone -> FAIL
  • cooling off period lapsed -> PASS
  • commit count less or equal to three -> FAIL
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> FAIL
  • Tested label found -> FAIL
  • assigned to an approver -> PASS
  • approver count at least three -> FAIL

@github-actions

This comment has been minimized.

Copy link
Member

@chmelevskij chmelevskij left a 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.

@blckmn
Copy link
Member Author

blckmn commented Oct 16, 2023

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
@github-actions

This comment has been minimized.

@blckmn
Copy link
Member Author

blckmn commented Oct 16, 2023

@haslinghuis will need someone with SonarCloud access to either give me access or review the security issue (doesn't like git on the path).

vite.config.js Outdated Show resolved Hide resolved
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 0 Code Smells

No Coverage information No Coverage information
3.5% 3.5% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint 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()),
Copy link
Member Author

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'.

@github-actions
Copy link
Contributor

Do you want to test this code? Here you have an automated build:
Betaflight-Configurator-Android
Betaflight-Configurator-Linux
Betaflight-Configurator-macOS
Betaflight-Configurator-Windows
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

@haslinghuis haslinghuis merged commit d6575e1 into betaflight:master Oct 17, 2023
8 of 9 checks passed
@blckmn blckmn deleted the version_in_vite branch October 17, 2023 00:55
chmelevskij pushed a commit to chmelevskij/betaflight-configurator that referenced this pull request Apr 27, 2024
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants