-
Notifications
You must be signed in to change notification settings - Fork 92
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
Update Windows installer metadata for wingetcreate
#446
Conversation
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.
Overall, looks good! I can't really judge how this fits in with wingetcreate
(e.g., if anything is missing), so my questions revolve around only the fields added/modified here.
shell: bash | ||
run: | | ||
b=/usr/src/build-extra && | ||
sed -i -e 's/^\(AppPublisher=\).*/\1The Git Fundamentals Team at GitHub/' $b/installer/install.iss | ||
# Remove '.vfs' from version | ||
version=$(echo ${{ needs.prereqs.outputs.tag_version }} | sed s/.vfs//g) && |
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.
Is there a specific reason that .vfs
is being removed? If the reason is "AppVersion only handles numeric characters", the filter on allowed version tags would need to be updated as well.
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.
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.
What was causing the .vfs
to be removed from the version as displayed in your screenshot?
It looks like it is specific to .vfs
after all? I'd still like to understand where that happens (build-extra
?).
I don't see anything calling that substring out in the installer scripts, so it's probably not specific to the .vfs
. In that case, we'd want whatever rule parses out the version here to match the rule used by Windows in displaying there.
I'm also going to double-check, but I vaguely remember it including the .vfs
when I was testing build-git-installers
.
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.
Found it! https://github.com/git-for-windows/build-extra/blob/main/installer/release.sh#L105-L107
sed -e 's/\.[^0-9]*\.[^0-9]*\./\./g' \
-e 's/\.[^.0-9]*\./\./g' -e 's/\.rc/\./g')"
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.
Sorry for the comment spam, but I'm trying to understand what's happening here. Why do you manually need to replace the version at all, if build-extra/installer/release.sh
already sets the version in the format you want?
For the rest of the metadata changed here, you're either updating something that's hardcoded to a value we don't want (e.g., AppPublisher=The Git Development Community
) or adding something new (e.g. ArchitecturesAllowed=x64
). AppVersion
doesn't seem to fit either of those.
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.
I actually went a little ways down the FileVersionInfo.FileVersion
path as well - glad I wasn't the only one who thought it was strange.
And I think experimenting with different versions is a good idea. I'll think a bit on the best way to test that - it's a little tricky, given that wingetcreate
only seems to accept installer urls, and I'd like to not have to build a dummy installer and do a dummy release for each sample version 😬.
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.
where
GetVersionInfo
gets its information from
It's from the resources. They are compiled via https://github.com/microsoft/git/blob/vfs-2.32.0/git.rc#L2. The constants are set via the Makefile
:
Lines 2306 to 2310 in bb8d8c3
git.res: git.rc GIT-VERSION-FILE GIT-PREFIX | |
$(QUIET_RC)$(RC) \ | |
$(join -DMAJOR= -DMINOR= -DMICRO= -DPATCHLEVEL=, $(wordlist 1, 4, \ | |
$(shell echo $(GIT_VERSION) 0 0 0 0 | tr '.a-zA-Z-' ' '))) \ | |
-DGIT_VERSION="\\\"$(GIT_VERSION)\\\"" -i $< -o $@ |
(The tr
call will replace all non-numerical characters by whitespace, then use the first four numbers (padding them with zeroes if there aren't enough to go 'round.)
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.
Oh interesting! Is the change I've added here the way to go then? Or should we make updates in git.rc
/Makefile
?
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.
(I sadly just realized that my 2 previous comments have been 'pending' for quite some time, which explains why I wasn't getting responses 😬)
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.
Quite honestly, I wonder why the fix is necessary for the version (the Makefile
magic should have picked the right version). For my curiosity, what version would you see without your patch, and which version do you see with your patch?
0a8d40c
to
7293a2d
Compare
Since there have been a few updates, I've issued another test run here: https://github.com/ldennington/git/runs/3874230850?check_suite_focus=true |
7293a2d
to
e9c2f49
Compare
|
||
# Add 'ArchitecturesAllowed' and 'LicenseFile' after 'AppVersion' | ||
sed -i -e '/^AppVersion=.*/a\ | ||
ArchitecturesAllowed=x64 \ |
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.
ArchitecturesAllowed=x64 \ | |
ArchitecturesAllowed=x64\ |
Updating installer metadata to align with the specification outlined in github/git-fundamentals#700 in preparation for using `wingetcreate` to publish releases to microsoft/winget-pkgs.
e9c2f49
to
d3f09f2
Compare
The |
Overview
This change sets up the infrastructure for microsoft/git to support deployments to
microsoft/winget-pkgs
viawingetcreate
. Specifically, it modifies thebuild-git-installers
workflow to updatebuild-extra
'sinstall.iss
file with the correct metadata for microsoft/git, as outlined in https://github.com/github/git-fundamentals/issues/700.Testing
Extracted the updated task (Update installer metadata for microsoft/git) and completed a successful test run in the
ldennington/git
fork.Associated work items
#699
#700