Skip to content

Commit c0aea8a

Browse files
authored
CI: updates to fix publishing universal darwin binaries (#6141)
1 parent c44aba5 commit c0aea8a

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

scripts/build_packages.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,14 @@ for var in "${VARIATION_ARRAY[@]}"; do
9797

9898
pushd ${PLATFORM_ROOT}
9999
tar --exclude=tools -zcf ${PKG_ROOT}/node_${CHANNEL}_${PKG_NAME}_${FULLVERSION}.tar.gz * >/dev/null 2>&1
100+
if [ $? -ne 0 ]; then
101+
echo "Error creating node tar file for package ${PLATFORM}. Aborting..."
102+
exit 1
103+
fi
100104
cd bin
101105
tar -zcf ${PKG_ROOT}/install_${CHANNEL}_${PKG_NAME}_${FULLVERSION}.tar.gz updater update.sh >/dev/null 2>&1
102106
if [ $? -ne 0 ]; then
103-
echo "Error creating tar file for package ${PLATFORM}. Aborting..."
107+
echo "Error creating install tar file for package ${PLATFORM}. Aborting..."
104108
exit 1
105109
fi
106110

scripts/release/mule/sign/sign.sh

+14-15
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#!/usr/bin/env bash
22
# shellcheck disable=2035,2129
33

4-
# TODO: This needs to be reworked a bit to support Darwin.
5-
64
set -exo pipefail
75
shopt -s nullglob
86

@@ -14,8 +12,8 @@ CHANNEL=${CHANNEL:-$(./scripts/release/mule/common/get_channel.sh "$NETWORK")}
1412
VERSION=${VERSION:-$(./scripts/compute_build_number.sh -f)}
1513
PKG_DIR="./tmp/node_pkgs"
1614
17-
OS_TYPE=$(./scripts/release/mule/common/ostype.sh)
18-
ARCHS=(amd64 arm64)
15+
OS_TYPES=(linux darwin)
16+
ARCHS=(amd64 arm64 universal)
1917
ARCH_BITS=(x86_64 aarch64)
2018
# Note that we don't want to use $GNUPGHOME here because that is a documented env var for the gnupg
2119
# project and if it's set in the environment mule will automatically pick it up, which could have
@@ -47,17 +45,19 @@ popd
4745
if [ -n "$S3_SOURCE" ]
4846
then
4947
i=0
50-
for arch in "${ARCHS[@]}"; do
51-
arch_bit="${ARCH_BITS[$i]}"
52-
(
48+
for os in "${OS_TYPES[@]}"; do
49+
for arch in "${ARCHS[@]}"; do
5350
mkdir -p "$PKG_DIR/$OS_TYPE/$arch"
54-
cd "$PKG_DIR"
55-
# Note the underscore after ${arch}!
56-
# Recall that rpm packages have the arch bit in the filenames (i.e., "x86_64" rather than "amd64").
57-
# Also, the order of the includes/excludes is important!
58-
aws s3 cp --recursive --exclude "*" --include "*${arch}_*" --include "*$arch_bit.rpm" --exclude "*.sig" --exclude "*.asc" --exclude "*.asc.gz" "s3://$S3_SOURCE/$CHANNEL/$VERSION" .
59-
)
60-
i=$((i + 1))
51+
arch_bit="${ARCH_BITS[$i]}"
52+
(
53+
cd "$PKG_DIR"
54+
# Note the underscore after ${arch}!
55+
# Recall that rpm packages have the arch bit in the filenames (i.e., "x86_64" rather than "amd64").
56+
# Also, the order of the includes/excludes is important!
57+
aws s3 cp --recursive --exclude "*" --include "*${arch}_*" --include "*$arch_bit.rpm" --exclude "*.sig" --exclude "*.asc" --exclude "*.asc.gz" "s3://$S3_SOURCE/$CHANNEL/$VERSION" .
58+
)
59+
i=$((i + 1))
60+
done
6161
done
6262
fi
6363

@@ -69,7 +69,6 @@ cd "$PKG_DIR"
6969
# Grab the directories directly underneath (max-depth 1) ./tmp/node_pkgs/ into a space-delimited string.
7070
# This will help us target `linux`, `darwin` and (possibly) `windows` build assets.
7171
# Note the surrounding parens turns the string created by `find` into an array.
72-
OS_TYPES=($(find . -mindepth 1 -maxdepth 1 -type d -printf '%f\n'))
7372
for os in "${OS_TYPES[@]}"; do
7473
for arch in "${ARCHS[@]}"; do
7574
if [ -d "$os/$arch" ]

0 commit comments

Comments
 (0)