Skip to content

Commit 02a05df

Browse files
committed
ensure-not-yet-deployed: support the ucrt64 pseudo architecture
In conjunction with the new `ucrt64` pseudo architecture in the `build-and-deploy` workflow, teach this script that for UCRT64 builds the MINGW package prefix is `mingw-w64-ucrt-x86_64` (not the literal `mingw-w64-ucrt64`), and that the resulting packages are deployed into the `x86_64` subdirectory of the Pacman repository, alongside the MINGW64 packages. The latter is so that the existing `git-for-windows-x86_64.db` database can keep referencing both flavors during the MINGW64 -> UCRT64 migration; the new `git-for-windows-ucrt64.db` database introduced in git-for-windows/pacman-repo#4 lives in the same `x86_64` branch of `pacman-repo` for exactly that reason. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 00d8c4d commit 02a05df

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

update-scripts/ensure-not-yet-deployed.sh

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ architecture=
1010
while case "$1" in
1111
--architecture=*)
1212
architecture=${1#*=}
13-
if test aarch64 = "$architecture"
14-
then
15-
MINGW_PACKAGE_PREFIX=mingw-w64-clang-aarch64
16-
else
17-
MINGW_PACKAGE_PREFIX=mingw-w64-$architecture
18-
fi
13+
case "$architecture" in
14+
aarch64) MINGW_PACKAGE_PREFIX=mingw-w64-clang-aarch64;;
15+
ucrt64) MINGW_PACKAGE_PREFIX=mingw-w64-ucrt-x86_64;;
16+
*) MINGW_PACKAGE_PREFIX=mingw-w64-$architecture;;
17+
esac
1918
;;
2019
-*) die "Unhandled option: '$1'";;
2120
*) break;
@@ -27,6 +26,16 @@ die "Usage: $0 <directory-containing-PKGBUILD>"
2726
cd "$1" ||
2827
die "Could not switch to '$1'"
2928

29+
# Some PKGBUILDs use $CARCH at top level (outside functions). Set it before
30+
# sourcing so that architecture-dependent logic (case statements, variable
31+
# assignments) works correctly even though we are not running under makepkg.
32+
case "$architecture" in
33+
aarch64) CARCH=aarch64;;
34+
i686) CARCH=i686;;
35+
*) CARCH=x86_64;;
36+
esac &&
37+
export CARCH &&
38+
3039
. ./PKGBUILD ||
3140
die "No/invalid PKGBUILD in '$1'?"
3241

@@ -58,7 +67,7 @@ esac &&
5867

5968
subdir="${architecture:-$arch}" &&
6069
case "$subdir" in
61-
any) subdir=x86_64;;
70+
any|ucrt64) subdir=x86_64;;
6271
esac &&
6372

6473
case "$pkgname" in

0 commit comments

Comments
 (0)