Last active
January 5, 2018 03:13
-
-
Save tkuchiki/cb5a96e852ffc451f652 to your computer and use it in GitHub Desktop.
gox + ghr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cwd is repository root | |
mkdir pkg | |
cd pkg | |
gox ../ | |
go-pkg-zip ./ | |
ghr -t TOKEN VERSION ./ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cd $1 | |
for FILE in $(find ./ -type f); do | |
zip ${FILE}.zip $FILE | |
rm -f $FILE | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew tap tcnksm/ghr | |
brew install ghr | |
(go get github.com/tcnksm/ghr) | |
ghr -t TOKEN VERSION pkg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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