Skip to content

Commit

Permalink
fix(ci): do not compress binary if no name has been given
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoomen committed Oct 23, 2020
1 parent 678d913 commit d607ee0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set -u

ROOT_DIR=$(cd "$(dirname "$0")/.."; pwd -P)
BUILD_TARGETS="${1:-}"
OUTFILE="${2:-vim-doge}.tar.gz"
OUTFILE="${2:-}"

# Build the pkg lib prerequisites if needed.
if [[ ! -d $ROOT_DIR/pkg/lib-es5 ]]; then
Expand All @@ -22,9 +22,12 @@ node $ROOT_DIR/pkg/lib-es5/bin.js . -t "$BUILD_TARGETS" --out-path $ROOT_DIR/bin
chmod +x $ROOT_DIR/bin/vim-doge

# Archive the binary.
cd $ROOT_DIR/bin
rm -f $ROOT_DIR/bin/*.tar.gz
echo "==> Archiving vim-doge -> $OUTFILE"
tar -czf "$OUTFILE" vim-doge
if [[ "$OUTFILE" != "" ]]; then
OUTFILE="$OUTFILE.tar.gz"
cd $ROOT_DIR/bin
rm -f $ROOT_DIR/bin/*.tar.gz
echo "==> Archiving vim-doge -> $OUTFILE"
tar -czf "$OUTFILE" vim-doge
fi

echo "🎉 Done building vim-doge binaries"

0 comments on commit d607ee0

Please sign in to comment.