Skip to content

Commit

Permalink
Merge pull request #91 from adrienjt/fix-85-upx-for-amd64-only
Browse files Browse the repository at this point in the history
upx for amd64 only
  • Loading branch information
adrienjt authored Nov 16, 2020
2 parents 7a231d3 + 8ddc194 commit 0d39a1d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/build_one.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fi
mkdir -p "$context_dir"

CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH go build -trimpath -o "$context_dir/$BIN" "${extra_args[@]}" "$PKG"
if [ "$VERSION" != dev ] && [ "$ARCH" != s390x ]; then
if [ "$VERSION" != dev ] && [ "$ARCH" = amd64 ]; then
upx-ucl "$context_dir/$BIN"
fi

Expand Down
6 changes: 4 additions & 2 deletions release/chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@

set -euo pipefail

# delete any leftover packaged charts
# (otherwise dates in index for their versions would be modified)
rm -f _out/multicluster-scheduler-*.tgz

helm package charts/multicluster-scheduler -d _out
curl -s https://charts.admiralty.io/index.yaml >_out/index_old.yaml
helm repo index _out --merge _out/index_old.yaml --url https://charts.admiralty.io

# TODO: revert datetime created override for old versions (submit GitHub issue)

# release CRDs separately, esp. for `helm upgrade`
cat charts/multicluster-scheduler/crds/* >_out/admiralty.crds.yaml

Expand Down
3 changes: 2 additions & 1 deletion release/image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ set -euo pipefail

# constants
default_registry="quay.io/admiralty"
default_archs="amd64 arm64 ppc64le s390x"

# environment variables
# required
IMG="${IMG}"
VERSION="${VERSION}"
# optional
REGISTRY="${REGISTRY:-$default_registry}"
ARCHS="${ARCHS:-amd64}"
ARCHS="${ARCHS:-$default_archs}"

read -ra archs <<<"$ARCHS"

Expand Down
2 changes: 1 addition & 1 deletion release/images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ imgs=(
)

for img in "${imgs[@]}"; do
IMG="$img" ARCHS="amd64 arm64 ppc64le s390x" ./release/image.sh
IMG="$img" ./release/image.sh
done

0 comments on commit 0d39a1d

Please sign in to comment.