mirror of
https://github.com/Luzifer/duplicity-backup.git
synced 2024-12-20 18:41:21 +00:00
Update build system / GH publish
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
6275a80c3f
commit
4f099ebe5f
3 changed files with 6 additions and 34 deletions
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
image: "quay.io/luzifer/repo-runner-image"
|
image: "reporunner/golang-alpine"
|
||||||
checkout_dir: /go/src/github.com/Luzifer/duplicity-backup
|
checkout_dir: /go/src/github.com/Luzifer/duplicity-backup
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -1,8 +1,11 @@
|
||||||
bindata:
|
bindata:
|
||||||
go-bindata help.txt
|
go-bindata help.txt
|
||||||
|
|
||||||
ci:
|
ci: publish
|
||||||
./publish.sh
|
|
||||||
|
publish:
|
||||||
|
curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh
|
||||||
|
bash golang.sh
|
||||||
|
|
||||||
setup-testenv:
|
setup-testenv:
|
||||||
go get github.com/onsi/ginkgo/ginkgo
|
go get github.com/onsi/ginkgo/ginkgo
|
||||||
|
|
31
publish.sh
31
publish.sh
|
@ -1,31 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
VERSION=$(git describe --tags --exact-match)
|
|
||||||
REPO=$(basename $(pwd))
|
|
||||||
ARCHS="linux/386 linux/amd64 linux/arm darwin/amd64 darwin/386 windows/amd64"
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
gox -ldflags="-X main.version=${VERSION}" -osarch="${ARCHS}"
|
|
||||||
sha256sum ${REPO}_* > SHA256SUMS
|
|
||||||
|
|
||||||
github-release release --user Luzifer --repo ${REPO} --tag ${VERSION} --name ${VERSION} --draft || true
|
|
||||||
|
|
||||||
for file in ${REPO}_* SHA256SUMS; do
|
|
||||||
github-release upload --user Luzifer --repo ${REPO} --tag ${VERSION} --name ${file} --file ${file}
|
|
||||||
done
|
|
Loading…
Reference in a new issue