Skip to content

Commit

Permalink
ci: zip binaries without bin/ (#38)
Browse files Browse the repository at this point in the history
JIRA: ALLY-217

Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
  • Loading branch information
afiune authored Oct 12, 2020
1 parent 509e4db commit 2d57b92
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,22 @@ compress_targets() {
local _target_with_ext
local _cli_name

for target in ${TARGETS[*]}; do
if [[ "$target" =~ exe ]]; then
_cli_name="bin/${BINARY}.exe"
else
_cli_name="bin/${BINARY}"
fi

cp "bin/${target}" "$_cli_name"
_target_with_ext="bin/${target%.exe}.zip"
zip "$_target_with_ext" "$_cli_name" >/dev/null

log $_target_with_ext
rm -f "$_cli_name"
done
( cd bin/
for target in ${TARGETS[*]}; do
if [[ "$target" =~ exe ]]; then
_cli_name="${BINARY}.exe"
else
_cli_name="${BINARY}"
fi

mv "${target}" "$_cli_name"
_target_with_ext="${target%.exe}.zip"
zip "$_target_with_ext" "$_cli_name" >/dev/null

log $_target_with_ext
rm -f "$_cli_name"
done
)
}

generate_shasums() {
Expand Down

0 comments on commit 2d57b92

Please sign in to comment.