Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: updates to fix publishing universal darwin binaries #6141

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion scripts/build_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,14 @@ for var in "${VARIATION_ARRAY[@]}"; do

pushd ${PLATFORM_ROOT}
tar --exclude=tools -zcf ${PKG_ROOT}/node_${CHANNEL}_${PKG_NAME}_${FULLVERSION}.tar.gz * >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Error creating node tar file for package ${PLATFORM}. Aborting..."
exit 1
fi
cd bin
tar -zcf ${PKG_ROOT}/install_${CHANNEL}_${PKG_NAME}_${FULLVERSION}.tar.gz updater update.sh >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Error creating tar file for package ${PLATFORM}. Aborting..."
echo "Error creating install tar file for package ${PLATFORM}. Aborting..."
exit 1
fi

Expand Down
29 changes: 14 additions & 15 deletions scripts/release/mule/sign/sign.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env bash
# shellcheck disable=2035,2129

# TODO: This needs to be reworked a bit to support Darwin.

set -exo pipefail
shopt -s nullglob

Expand All @@ -14,8 +12,8 @@ CHANNEL=${CHANNEL:-$(./scripts/release/mule/common/get_channel.sh "$NETWORK")}
VERSION=${VERSION:-$(./scripts/compute_build_number.sh -f)}
PKG_DIR="./tmp/node_pkgs"
[email protected]
OS_TYPE=$(./scripts/release/mule/common/ostype.sh)
ARCHS=(amd64 arm64)
OS_TYPES=(linux darwin)
ARCHS=(amd64 arm64 universal)
ARCH_BITS=(x86_64 aarch64)
# Note that we don't want to use $GNUPGHOME here because that is a documented env var for the gnupg
# project and if it's set in the environment mule will automatically pick it up, which could have
Expand Down Expand Up @@ -47,17 +45,19 @@ popd
if [ -n "$S3_SOURCE" ]
then
i=0
for arch in "${ARCHS[@]}"; do
arch_bit="${ARCH_BITS[$i]}"
(
for os in "${OS_TYPES[@]}"; do
for arch in "${ARCHS[@]}"; do
mkdir -p "$PKG_DIR/$OS_TYPE/$arch"
cd "$PKG_DIR"
# Note the underscore after ${arch}!
# Recall that rpm packages have the arch bit in the filenames (i.e., "x86_64" rather than "amd64").
# Also, the order of the includes/excludes is important!
aws s3 cp --recursive --exclude "*" --include "*${arch}_*" --include "*$arch_bit.rpm" --exclude "*.sig" --exclude "*.asc" --exclude "*.asc.gz" "s3://$S3_SOURCE/$CHANNEL/$VERSION" .
)
i=$((i + 1))
arch_bit="${ARCH_BITS[$i]}"
(
cd "$PKG_DIR"
# Note the underscore after ${arch}!
# Recall that rpm packages have the arch bit in the filenames (i.e., "x86_64" rather than "amd64").
# Also, the order of the includes/excludes is important!
aws s3 cp --recursive --exclude "*" --include "*${arch}_*" --include "*$arch_bit.rpm" --exclude "*.sig" --exclude "*.asc" --exclude "*.asc.gz" "s3://$S3_SOURCE/$CHANNEL/$VERSION" .
)
i=$((i + 1))
done
done
fi

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