Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.

Commit

Permalink
generate checksums for bins
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanl committed Nov 30, 2015
1 parent 7f5ebb7 commit 6997a3b
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@ if [[ -z "$ver" ]]; then
exit 1
fi


DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
OUTPUT_DIR="${DIR}/../builds/${ver}"

mkdir -p $OUTPUT_DIR
if [[ -z $SKIPBUILD ]]; then
mkdir -p $OUTPUT_DIR

xgo \
--dest $OUTPUT_DIR \
--targets='windows/*,darwin/*,linux/*' \
-out doit-0.6.0 github.com/bryanl/doit/cmd/doit
xgo \
--dest $OUTPUT_DIR \
--targets='windows/*,darwin/*,linux/*' \
-out doit-0.6.0 github.com/bryanl/doit/cmd/doit
fi

for f in $(find ${OUTPUT_DIR} -maxdepth 1 -perm -111 -type f); do
echo "generating sha256 checksum for $f"
openssl dgst -sha256 < $f > ${f}.sha256
# FIXME mac only for now
cd $OUTPUT_DIR
echo $CWD
for f in $(find . -maxdepth 1 -perm -111 -type f); do
fn=$(basename $f)
echo "generating sha256 checksum for $fn"
shasum -a 256 ${fn} > ${f}.sha256
done

0 comments on commit 6997a3b

Please sign in to comment.