Skip to content

Commit 1d772da

Browse files
committed
pacman-helper: prepare for UCRT64 packages
We plan on building Git for Windows against the more modern UCRT instead of the old MSVCRT at some point in the future (Most likely Git 3.0). To be able to do that we'll need to be able to create and publish UCRT64 packages. And to aid a smooth transition, we'll need to be able to publish MINGW64 and UCRT64 packages in parallel for a little while. Prepare our pacman-helper script to deal with this. Signed-off-by: Matthias Aßhauer <mha1993@live.de>
1 parent 0f36ec0 commit 1d772da

1 file changed

Lines changed: 21 additions & 13 deletions

File tree

pacman-helper.sh

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ quick_action () { # <action> <file>...
249249
mingw-w64-*.pkg.tar.xz|mingw-w64-*.pkg.tar.zst)
250250
arch=${file##mingw-w64-}
251251
arch=${arch#clang-}
252+
arch=${arch#ucrt-}
252253
arch=${arch%%-*}
253254
key=${arch}_mingw
254255
;;
@@ -283,10 +284,11 @@ quick_action () { # <action> <file>...
283284
file=${file%-[0-9]*-[0-9]*}
284285
key=${arch}_msys
285286
;;
286-
mingw-w64-i686-*|mingw-w64-x86_64-*|mingw-w64-clang-aarch64-*)
287+
mingw-w64-i686-*|mingw-w64-x86_64-*|mingw-w64-ucrt-x86_64-*|mingw-w64-clang-aarch64-*)
287288
test remove = "$label" || die "Cannot add $path"
288289
arch=${file#mingw-w64-}
289290
arch=${arch#clang-}
291+
arch=${arch#ucrt-}
290292
arch=${arch%%-*}
291293
file=${file%-any}
292294
file=${file%-[0-9]*-[0-9]*}
@@ -367,9 +369,12 @@ quick_action () { # <action> <file>...
367369
*,) db2=;;
368370
i686,*) db2=mingw32;;
369371
*aarch64*) db2=clangarm64;;
370-
*) db2=mingw64;;
372+
*)
373+
db2=mingw64
374+
db3=ucrt64
375+
;;
371376
esac
372-
for db in git-for-windows-$arch ${db2:+git-for-windows-$db2}
377+
for db in git-for-windows-$arch ${db2:+git-for-windows-$db2} ${db3:+git-for-windows-$db3}
373378
do
374379
# The Pacman repository on Azure Blobs still uses the old naming scheme
375380
case "$db" in
@@ -419,17 +424,20 @@ quick_action () { # <action> <file>...
419424
cp git-for-windows-$arch.db.tar.xz.sig git-for-windows-$arch.db.sig
420425
}
421426
} &&
422-
if test -n "$db2"
423-
then
424-
$action $sign_option git-for-windows-$db2.db.tar.xz $mingw &&
425-
{ test ! -h git-for-windows-$db2.db || rm git-for-windows-$db2.db; } &&
426-
cp git-for-windows-$db2.db.tar.xz git-for-windows-$db2.db && {
427-
test -z "$sign_option" || {
428-
{ test ! -h git-for-windows-$db2.db.sig || rm git-for-windows-$db2.db.sig; } &&
429-
cp git-for-windows-$db2.db.tar.xz.sig git-for-windows-$db2.db.sig
427+
for db in $db2 $db3
428+
do
429+
if test -n "$db"
430+
then
431+
$action $sign_option git-for-windows-$db.db.tar.xz $mingw &&
432+
{ test ! -h git-for-windows-$db.db || rm git-for-windows-$db.db; } &&
433+
cp git-for-windows-$db.db.tar.xz git-for-windows-$db.db && {
434+
test -z "$sign_option" || {
435+
{ test ! -h git-for-windows-$db.db.sig || rm git-for-windows-$db.db.sig; } &&
436+
cp git-for-windows-$db.db.tar.xz.sig git-for-windows-$db.db.sig
437+
}
430438
}
431-
}
432-
fi &&
439+
fi
440+
done &&
433441

434442
# Remove the existing versions from the Git branch
435443
printf '%s\n' $msys $mingw |

0 commit comments

Comments
 (0)