1
1
#! /usr/bin/env bash
2
2
# shellcheck disable=2035,2129
3
3
4
- # TODO: This needs to be reworked a bit to support Darwin.
5
-
6
4
set -exo pipefail
7
5
shopt -s nullglob
8
6
@@ -14,8 +12,8 @@ CHANNEL=${CHANNEL:-$(./scripts/release/mule/common/get_channel.sh "$NETWORK")}
14
12
VERSION=${VERSION:- $(./ scripts/ compute_build_number.sh -f)}
15
13
PKG_DIR=" ./tmp/node_pkgs"
16
14
17
- OS_TYPE= $( ./scripts/release/mule/common/ostype.sh )
18
- ARCHS=(amd64 arm64)
15
+ OS_TYPES=(linux darwin )
16
+ ARCHS=(amd64 arm64 universal )
19
17
ARCH_BITS=(x86_64 aarch64)
20
18
# Note that we don't want to use $GNUPGHOME here because that is a documented env var for the gnupg
21
19
# project and if it's set in the environment mule will automatically pick it up, which could have
47
45
if [ -n " $S3_SOURCE " ]
48
46
then
49
47
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
53
50
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
61
61
done
62
62
fi
63
63
@@ -69,7 +69,6 @@ cd "$PKG_DIR"
69
69
# Grab the directories directly underneath (max-depth 1) ./tmp/node_pkgs/ into a space-delimited string.
70
70
# This will help us target `linux`, `darwin` and (possibly) `windows` build assets.
71
71
# 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' ) )
73
72
for os in " ${OS_TYPES[@]} " ; do
74
73
for arch in " ${ARCHS[@]} " ; do
75
74
if [ -d " $os /$arch " ]
0 commit comments