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

nix: fix version string #4986

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

nix: fix version string #4986

wants to merge 1 commit into from

Conversation

kouyk
Copy link

@kouyk kouyk commented Feb 9, 2024

Derive the version string using available information. This will work well for clones of this repository, but not pure sources (e.g. GitHub source downloads).

Additionally, don't override the version found in existing .tag to allow actual version to be specified manually. The side effect of this is that the actual version might differ from that of the derivation, but there are no trivial workarounds to set the derivation version based on existing .tag file given that the flakes are stored in a subdirectory instead of the root of the repository.

Derive the version string using available information. This will work well for
clones of this repository, but not pure sources (e.g. GitHub source downloads).

Additionally, don't override the version found in existing .tag to allow actual
version to be specified manually. The side effect of this is that the actual
version might differ from that of the derivation, but there are no trivial
workarounds to set the derivation version based on existing .tag file given
that the flakes are stored in a subdirectory instead of the root of the
repository.
@kouyk
Copy link
Author

kouyk commented Feb 9, 2024

cc: @happenslol, @gabyx, @edmundmiller

@@ -113,7 +119,9 @@
'';

postPatch = ''
echo ${version} > .tag
if [ ! -f .tag ]; then
echo ${version} > .tag
Copy link
Owner

Choose a reason for hiding this comment

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

it's important (for my sanity) that the version number correlates with the version number that wezterm's build would have generated for the same git revision. Please share examples of what is being injected here!

Copy link
Author

Choose a reason for hiding this comment

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

this pr aligns the version number with that of normal releases, instead of using just the first 8 characters of commit hash without date and time information. for this particular change, it continues to use whatever version is defined to (in this PR wezterm-00000000-000000-xxxxxxxx), unless there is an existing tag file which is useful for cases when the source tar is downloaded and the version cannot be reliably retrieved.

these few lines are simply bash, not nix.

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.

None yet

2 participants