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

deployment: embed build metadata #49

Merged
merged 1 commit into from
Dec 1, 2021
Merged

Conversation

travisgroth
Copy link
Contributor

@travisgroth travisgroth commented Nov 30, 2021

Enable embedding build metadata such as pomerium-cli version or git commit hash. Unfortunately there's no particularly direct way to pass this information into an electron-builder application, so this PR places the information into a new metadata.json file. This file can then be referenced by the desktop UI elements similar to package.json.

The benefit of using a new file over package.json is that we (a) don't have to rewrite an existing file, which feels wrong (b) can avoid accidentally persisting transient changes to package.json

Details:

  • Centralize upstream pomerium-cli version to top level package.json
  • Add script to generate the new file (./src/metadata.json)
  • Add new metadata command to run said script as a dependency for yarn build
  • Ensure git ignores /src/metadata.json

It should be easy to add other information such as build time.

This will need a minor rebase onto the in-progress UI refactor if it seems like a sane approach.

@travisgroth travisgroth marked this pull request as ready for review December 1, 2021 17:46
@travisgroth travisgroth merged commit 5c9361e into master Dec 1, 2021
@travisgroth travisgroth deleted the embed_git_version branch December 1, 2021 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants