Skip to content

Commit 34dc1c5

Browse files
authored
Merge pull request #325 from dennisameling/archive-arm64
archive: add arm64 artifact option
2 parents 77a784e + 78b324e commit 34dc1c5

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

archive/release.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ do
2323
--output=*)
2424
output_directory="${1#*=}"
2525
;;
26+
--include-arm64-artifacts=*)
27+
arm64_artifacts_directory="${1#*=}"
28+
;;
2629
-*)
2730
die "Unknown option: $1"
2831
;;
@@ -105,13 +108,22 @@ hardlink_all_dlls () {
105108

106109
hardlink_all_dlls
107110

108-
109111
# Make a list of files to include
110112
LIST="$(ARCH=$ARCH BITNESS=$BITNESS \
111113
PACKAGE_VERSIONS_FILE="$SCRIPT_PATH"/root/etc/package-versions.txt \
112114
sh "$SCRIPT_PATH"/../make-file-list.sh "$@")" ||
113115
die "Could not generate file list"
114116

117+
# ARM64 Windows handling
118+
ARM64_FOLDER=
119+
if test -n "$arm64_artifacts_directory"
120+
then
121+
echo "Including ARM64 artifacts from $arm64_artifacts_directory";
122+
TARGET="$(cygpath -au "$output_directory")"/Git-"$VERSION"-arm64.tar.bz2
123+
mkdir -p "$SCRIPT_PATH/root/arm64"
124+
cp -ar $arm64_artifacts_directory/* "$SCRIPT_PATH/root/arm64"
125+
ARM64_FOLDER="arm64"
126+
fi
115127

116128
# Create the archive
117129

@@ -120,8 +132,8 @@ pacman -Sy --noconfirm tar ||
120132
die "Could not install tar"
121133

122134
echo "Creating .tar.bz2 archive" &&
123-
if ! tar -c -j -f "$TARGET" --directory=/ --exclude=etc/post-install/* $LIST --directory=$SCRIPT_PATH/root bin dev etc tmp mingw$BITNESS && test $? = 1
135+
if ! tar -c -j -f "$TARGET" --directory=/ --exclude=etc/post-install/* $LIST --directory=$SCRIPT_PATH/root bin dev etc tmp mingw$BITNESS $ARM64_FOLDER && test $? = 1
124136
then
125-
tar -c -j -f "$TARGET" --directory=/ --exclude=etc/post-install/* $LIST --directory=$SCRIPT_PATH/root bin dev etc tmp mingw$BITNESS
137+
tar -c -j -f "$TARGET" --directory=/ --exclude=etc/post-install/* $LIST --directory=$SCRIPT_PATH/root bin dev etc tmp mingw$BITNESS $ARM64_FOLDER
126138
fi &&
127139
echo "Success! You will find the new archive at \"$TARGET\"."

0 commit comments

Comments
 (0)