1
0
Fork 0
mirror of https://github.com/Luzifer/elb-instance-status.git synced 2024-11-08 14:00:09 +00:00

Update publishing mechanic

This commit is contained in:
Knut Ahlers 2016-11-29 13:49:39 +01:00
parent 856bc8ed07
commit eee785dda6
No known key found for this signature in database
GPG key ID: 6E122DD2F6F74ABB
3 changed files with 4 additions and 35 deletions

View file

@ -4,4 +4,4 @@ go:
- 1.7
script:
- ./publish.sh
- make ci

3
Makefile Normal file
View file

@ -0,0 +1,3 @@
ci:
curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh
bash golang.sh

View file

@ -1,34 +0,0 @@
#!/bin/sh
VERSION=$(git describe --tags --exact-match)
REPO=$(basename $(pwd))
ARCHS="linux/386 linux/amd64 linux/arm darwin/amd64 darwin/386"
set -e
if [ -z "${TRAVIS_TAG}" ]; then
echo "Not executing for non tag, but this is no failure."
exit 0
fi
if [ -z "${VERSION}" ]; then
echo "No tag present, stopping build now."
exit 0
fi
if [ -z "${GITHUB_TOKEN}" ]; then
echo "Please set \$GITHUB_TOKEN environment variable"
exit 1
fi
set -x
go get github.com/aktau/github-release
go get github.com/mitchellh/gox
github-release release --user Jimdo --repo ${REPO} --tag ${VERSION} --name ${VERSION} || true
gox -ldflags="-X main.version=${VERSION}" -osarch="${ARCHS}"
for file in ${REPO}_*; do
github-release upload --user Jimdo --repo ${REPO} --tag ${VERSION} --name ${file} --file ${file}
done