Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
Last active January 5, 2018 03:13
Show Gist options
  • Save tkuchiki/cb5a96e852ffc451f652 to your computer and use it in GitHub Desktop.
Save tkuchiki/cb5a96e852ffc451f652 to your computer and use it in GitHub Desktop.
gox + ghr
# cwd is repository root
mkdir pkg
cd pkg
gox ../
go-pkg-zip ./
ghr -t TOKEN VERSION ./
#!/bin/bash
set -e
cd $1
for FILE in $(find ./ -type f); do
zip ${FILE}.zip $FILE
rm -f $FILE
done
#!/bin/bash
buildname="$(basename $(pwd))"
set -e
rm -f ${buildname}
mkdir -p tmp
gox
for f in $(ls ${buildname}* | grep -v tmp | egrep -v '\.go$' | sort); do
mv ${f} ${buildname}
zip ${f}.zip ${buildname}
mv ${f}.zip tmp/
rm -f ${buildname}
done
brew tap tcnksm/ghr
brew install ghr
(go get github.com/tcnksm/ghr)
ghr -t TOKEN VERSION pkg
go get github.com/mitchellh/gox
gox -build-toolchain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment