-
Notifications
You must be signed in to change notification settings - Fork 346
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
build: INFENG-739: remove hardcoded version from Vite config #9532
Merged
davidfluck-hpe
merged 1 commit into
INFENG-382-release-redesign
from
INFENG-739-vite-config
Jul 2, 2024
Merged
build: INFENG-739: remove hardcoded version from Vite config #9532
davidfluck-hpe
merged 1 commit into
INFENG-382-release-redesign
from
INFENG-739-vite-config
Jul 2, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Replace the process.env.VERSION variable explicitly defined in vite.config.mts with either the actual VERSION environment variable, if it's set, or the most recent git tag, followed by an optional commit counter and partial unique SHA hash. This shells out to git, and accounts for the rare but possible case that the config is being from outside of a git repository. In that situation, the version string is useless anyway, so we return "unknown" from the shell. * During the release, we will set VERSION ourselves based on the tag, so we don't have to go over the top trying to parse it out here. The local version doesn't matter too much, either, as it's only referenced during development, and, as far as I can tell, is really only used to display the current version to the user. During the release, we can set VERSION from CircleCI directly, as it already provides the tag if the run was triggered by one.
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
loksonarius
approved these changes
Jun 17, 2024
keita-determined
approved these changes
Jun 17, 2024
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.
left a comment, otherwise LGTM
gt2345
approved these changes
Jun 18, 2024
c143907
into
INFENG-382-release-redesign
32 of 85 checks passed
davidfluck-hpe
added a commit
that referenced
this pull request
Jul 23, 2024
INFENG-739: remove version string from Vite config * Replace the process.env.VERSION variable explicitly defined in vite.config.mts with either the actual VERSION environment variable, if it's set, or the most recent git tag, followed by an optional commit counter and partial unique SHA hash. This shells out to git, and accounts for the rare but possible case that the config is being from outside of a git repository. In that situation, the version string is useless anyway, so we return "unknown" from the shell. * During the release, we will set VERSION ourselves based on the tag, so we don't have to go over the top trying to parse it out here. The local version doesn't matter too much, either, as it's only referenced during development, and, as far as I can tell, is really only used to display the current version to the user. During the release, we can set VERSION from CircleCI directly, as it already provides the tag if the run was triggered by one.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
build: INFENG-739: remove hardcoded version from Vite config
Ticket
INFENG-739
Description
Replace the process.env.VERSION variable explicitly defined in vite.config.mts with either the actual VERSION environment variable, if it's set, or the most recent git tag, followed by an optional commit counter and partial unique SHA hash. This shells out to git, and also accounts for the rare but possible case that the config is being used from outside of a git repository. In that situation, the version string is useless anyway, so we return "unknown" from the shell.
During the release, we will set VERSION ourselves based on the tag, so we don't have to go over the top trying to parse it out here. The local version doesn't matter too much, either, as it's only referenced during development, and, as far as I can tell, is really only used to display the current version to the developer. During the release, we can set VERSION from CircleCI directly, as it already provides the tag if the run was triggered by one.
Test Plan
devcluster
works fine.git tag v1.0.0
. This temporarily resolves apip
issue I need to fix that causes adetermined>=0.13.11
, namely: the versionmake
tries to build doesn't have a proper tag, so it reads as <0.13.11 to pip, and thus fails. Having a tag available will satisfy the requirement. My apologies. It also makes it possible to see a more interesting version string in the UI.make clean ; make all
to build Determined locally.cd
into./webui/react
and runnpm start
. Runnvm use
in this directory first if you need to switch Node versions.v1.0.0
. If you happened to tag a commit further back thanHEAD
, you would see something likev1.1.0-2-gca758a773
, which is the tag itself,v1.0.0
, the number of commits since that tag,2
, the special prefix indicating a commit hash,g
, and the unique hash prefix ofHEAD
,ca758a773
.git tag -d v1.0.0
, kill the runningvite
instance, and re-runnpm start
. You should see just a hash prefix in place of the version this time:49b0af80a
(just don't rebuild Determined or you'll hit the samepip
error described before).vite
again. Runexport VERSION=1.1.2
, or your preferred version string, and re-runnpm start
.VERSION
environment variable.unset VERSION
wherever you setVERSION
, and delete any tags you might have missed.Checklist
docs/release-notes/
See Release Note for details.