Skip to content

Commit 9311b8f

Browse files
committed
fix(release): tar linux binaries
Signed-off-by: Salim Afiune Maya <[email protected]>
1 parent bb96b3b commit 9311b8f

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

scripts/lacework_cli_release.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,13 @@ prerequisites() {
5454
}
5555

5656
clean_cache() {
57+
log "Cleaning cache bin/ directory"
5758
rm -rf bin/*
5859
}
5960

6061
build_cli_cross_platform() {
6162
clean_cache
63+
log "Building cross-platform binaries"
6264
make build-cli-cross-platform
6365
}
6466

@@ -68,7 +70,7 @@ generate_shasums() {
6870
log "Generating sha256sum Hashes"
6971
for target in ${TARGETS[*]}; do
7072

71-
if [[ "$target" =~ /linux/ ]]; then
73+
if [[ "$target" =~ linux ]]; then
7274
_compressed="$target.tar.gz"
7375
else
7476
_compressed="$target.zip"
@@ -86,11 +88,16 @@ generate_shasums() {
8688
# need the raw binaries anymore.
8789
compress_targets() {
8890
log "Compressing target binaries"
91+
local _target_with_ext
8992
for target in ${TARGETS[*]}; do
90-
if [[ "$target" =~ /linux/ ]]; then
91-
tar -czvf "bin/${target}.tar.gz" "bin/${target}"
93+
if [[ "$target" =~ linux ]]; then
94+
_target_with_ext="bin/${target}.tar.gz"
95+
log $_target_with_ext
96+
tar -czvf "${_target_with_ext}" "bin/${target}" 2>/dev/null
9297
else
93-
zip "bin/${target}.zip" "bin/${target}"
98+
_target_with_ext="bin/${target}.zip"
99+
log $_target_with_ext
100+
zip "${_target_with_ext}" "bin/${target}" >/dev/null
94101
fi
95102
rm -f "bin/${target}"
96103
done

0 commit comments

Comments
 (0)