Skip to content

Commit a6a8155

Browse files
committed
fixup! release: create initial Windows installer build workflow
I almost made the mistake of releasing v2.41.0.vfs.1.0 (where I chose the "1" to indicate that it is based on a newer Git for Windows version than v2.41.0.vfs.0.0, namely based on v2.41.0.windows.2). This would have broken VFS for Git, though. The code comments at https://github.com/microsoft/VFSForGit/blob/3790eb06e14d/Version.props#L7-L22 and https://github.com/microsoft/VFSForGit/blob/3790eb06e14d/GVFS/GVFS/CommandLine/GVFSVerb.cs#L901-L908 clearly state: Note that we require that the revision (Z) of the Git version string (2.X.Y.vfs.Z.W) is an exact match. [...] <MinimumGitVersion>v2.31.0.vfs.0.1</MinimumGitVersion> To make sure that I cannot make that mistake anymore, let's validate the tag format to the stringent pattern that is actually required to make VFS for Git work as intended. Helped-by: Matthew John Cheetham <mjcheetham@outlook.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 206ba6d commit a6a8155

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

.github/workflows/build-git-installers.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ jobs:
1818
tag_version: ${{ steps.tag.outputs.version }} # The version number (without preceding "v"), e.g. 2.32.0.vfs.0.0
1919
deb_signable: ${{ steps.deb.outputs.signable }} # Whether the credentials needed to sign the .deb package are available
2020
steps:
21+
- name: Validate tag
22+
run: |
23+
echo "$GITHUB_REF" |
24+
grep '^refs/tags/v2\.\(0\|[1-9][0-9]*\)\.\(0\|[1-9][0-9]*\)\.vfs\.0\.\(0\|[1-9][0-9]*\)$' || {
25+
echo "::error::${GITHUB_REF#refs/tags/} is not of the form v2.<X>.<Y>.vfs.0.<W>" >&2
26+
exit 1
27+
}
2128
- name: Determine tag to build
2229
run: |
2330
echo "name=${GITHUB_REF#refs/tags/}" >>$GITHUB_OUTPUT

0 commit comments

Comments
 (0)