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

Use dynamic version number from git tags in webapp #906

Merged
merged 2 commits into from
Oct 14, 2024

Conversation

BenjaminCharmes
Copy link
Contributor

Closes #713

Copy link

codecov bot commented Oct 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.22%. Comparing base (a28c0b5) to head (a546f1a).
Report is 23 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #906   +/-   ##
=======================================
  Coverage   68.22%   68.22%           
=======================================
  Files          62       62           
  Lines        3909     3909           
=======================================
  Hits         2667     2667           
  Misses       1242     1242           

Copy link

cypress bot commented Oct 3, 2024

datalab    Run #2547

Run Properties:  status check passed Passed #2547  •  git commit f3dfdbb478 ℹ️: Merge 79b69e58442b098583f7406c49e1279a1d70b008 into ea79e31a0c7416523c16234a0a40...
Project datalab
Run status status check passed Passed #2547
Run duration 06m 34s
Commit git commit f3dfdbb478 ℹ️: Merge 79b69e58442b098583f7406c49e1279a1d70b008 into ea79e31a0c7416523c16234a0a40...
Committer Benjamin Charmes
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 396

@ml-evs
Copy link
Member

ml-evs commented Oct 3, 2024

I'd like the version to be entirely dynamic and not reliant on someone committing the new version, we might need to look around a bit for packages that let us do this a la setuptools-scm

@ml-evs ml-evs added this to the v0.5.x milestone Oct 8, 2024
@BenjaminCharmes BenjaminCharmes added enhancement New feature or request webapp For issues/PRs pertaining to the web interface labels Oct 8, 2024
@ml-evs ml-evs mentioned this pull request Oct 14, 2024
7 tasks
@ml-evs ml-evs marked this pull request as ready for review October 14, 2024 14:17
Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't happy with any libraries or the functionality of npm version from-git (which assumes you want to commit the tag, and doesn't let you control many things), so I've instead pushed a little node script that grabs the git version and sets it during build via the VUE_APP_GIT_VERSION env var (which can also be used to override it in cases where the .git info is not available). This basically fits the approach we take for Python now too.

The only weirdness is that the version in package.json (0.0.0-git) should now basically be ignored, and is just used as a fallback when the version has not been set by any other source.

@ml-evs ml-evs changed the title Extend version numbers in About page Use dynamic version number from git tags in webapp Oct 14, 2024
@ml-evs ml-evs added the build For issues/PRs pertaining to the build or deployment of the package label Oct 14, 2024
@BenjaminCharmes BenjaminCharmes merged commit 937d9df into main Oct 14, 2024
16 checks passed
BenjaminCharmes added a commit that referenced this pull request Oct 15, 2024
* Extend version handling in About page

* Version app dynamically via auxiliary node script

---------

Co-authored-by: Matthew Evans <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build For issues/PRs pertaining to the build or deployment of the package enhancement New feature or request webapp For issues/PRs pertaining to the web interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend version numbers in app about page
2 participants