Skip to content
This repository has been archived by the owner on May 12, 2022. It is now read-only.

Commit

Permalink
Fix release script
Browse files Browse the repository at this point in the history
  • Loading branch information
John Esmet committed Mar 5, 2018
1 parent 044781f commit 2bd70dd
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions release.bash
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

if [ -z "$VERSION" ] ; then
echo "Must provide VERSION"
exit 1
Expand All @@ -14,17 +16,15 @@ function release() {
export GOOS=$1
export GOARCH=$2

bin_src_path=ankh/ankh
echo "Building for GOOS=${GOOS} and GOARCH=${GOARCH} using binary from ${bin_src_path}"
echo "Building for GOOS=${GOOS} and GOARCH=${GOARCH}"

bin=ankh-${GOOS}-${GOARCH}
targz=${bin}.tar.gz
rm -f ${release_dir}/${bin} ${release_dir}/${targz}
env GOOS=${GOOS} GOARCH=${GOARCH} make && file ${bin_src_path} && cp ${bin_src_path} ${release_dir}/${bin} && (cd $release_dir && rm -f ankh && cp ${bin} ankh && tar cvfz ${targz} ankh && rm -f ankh) || exit 1
targz=ankh-${GOOS}-${GOARCH}.tar.gz
rm -f ${release_dir}/ankh ${release_dir}/${targz}
env GOOS=${GOOS} GOARCH=${GOARCH} make
file ankh/ankh && mv -f ankh/ankh ${release_dir}/ankh
(cd $release_dir && tar cvfz ${targz} ankh && ls -lrt && rm -f ankh) || exit 1
}

release linux amd64

release darwin amd64

make clean

0 comments on commit 2bd70dd

Please sign in to comment.