Skip to content

Commit 12baaa3

Browse files
kp2pml30AgustinRamiroDiaz
authored andcommitted
chore: integrate into zuul
1 parent 508c0ff commit 12baaa3

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

support/ci/pipelines/build.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
TARGET=""
44
EXECUTOR_VERSION=""
55
EXTRA_BUNDLE=""
6+
COMPRESSION_LEVEL=9
67

78
while [[ $# -gt 0 ]]; do
89
case $1 in
@@ -32,6 +33,14 @@ while [[ $# -gt 0 ]]; do
3233
EXTRA_BUNDLE="$(readlink -f "$EXTRA_BUNDLE")"
3334
shift
3435
;;
36+
--compression-level)
37+
COMPRESSION_LEVEL="$2"
38+
shift 2
39+
;;
40+
--compression-level=*)
41+
COMPRESSION_LEVEL="${1#*=}"
42+
shift
43+
;;
3544
-h|--help)
3645
echo "Usage: $0 [--target TARGET] [--executor-version VERSION]"
3746
echo " --target TARGET Specify the target platform (default: universal)"
@@ -56,6 +65,13 @@ if [[ -n "$EXECUTOR_VERSION" && -z "$EXECUTOR_VERSION" ]]; then
5665
exit 1
5766
fi
5867

68+
if [[ "$COMPRESSION_LEVEL" == [0-9] ]]; then
69+
true
70+
else
71+
echo "Error: --compression-level must be an integer between 0 and 9" >&2
72+
exit 1
73+
fi
74+
5975
HEAD_REVISION=$(git rev-parse HEAD)
6076

6177
echo "\$TARGET = $TARGET"
@@ -87,6 +103,6 @@ then
87103
tar -A -f "$PREV/build/genvm-$TARGET.tar" "$EXTRA_BUNDLE"
88104
fi
89105

90-
xz -z -9 --force "$PREV/build/genvm-$TARGET.tar"
106+
xz -z "-$COMPRESSION_LEVEL" --force "$PREV/build/genvm-$TARGET.tar"
91107

92108
popd

0 commit comments

Comments
 (0)