mirror of https://github.com/liamg/aminal.git
release script
This commit is contained in:
parent
a9c31e7a8e
commit
550c841411
|
@ -3,7 +3,7 @@
|
|||
# Check https://circleci.com/docs/2.0/language-go/ for more details
|
||||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
test:
|
||||
docker:
|
||||
# specify the version
|
||||
- image: liamg/golang-opengl
|
||||
|
@ -11,7 +11,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- run: make test
|
||||
release:
|
||||
build-linux:
|
||||
docker:
|
||||
# specify the version
|
||||
- image: liamg/golang-opengl
|
||||
|
@ -20,17 +20,40 @@ jobs:
|
|||
- build
|
||||
steps:
|
||||
- checkout
|
||||
- run: make release
|
||||
- run: tree release
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
- run: make build-linux
|
||||
- run: tree bin
|
||||
build-darwin:
|
||||
docker:
|
||||
# specify the version
|
||||
- image: karalabe/xgo-latest:latest
|
||||
working_directory: /go/src/github.com/liamg/aminal
|
||||
steps:
|
||||
- checkout
|
||||
- run: make build-darwin
|
||||
- run: tree bin
|
||||
release:
|
||||
docker:
|
||||
# specify the version
|
||||
- image: karalabe/xgo-latest:latest
|
||||
working_directory: /go/src/github.com/liamg/aminal
|
||||
steps:
|
||||
- checkout
|
||||
- run: echo nothing to do
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- build
|
||||
- test
|
||||
- build-darwin
|
||||
requires:
|
||||
- test
|
||||
- build-linux
|
||||
requires:
|
||||
- test
|
||||
- release:
|
||||
requires:
|
||||
- build-linux
|
||||
- build-darwin
|
||||
filters:
|
||||
tags:
|
||||
only: /.*/
|
||||
|
|
15
Makefile
15
Makefile
|
@ -30,7 +30,14 @@ update-fonts: install-tools
|
|||
curl -L https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/Hack/Bold/complete/Hack%20Bold%20Nerd%20Font%20Complete.ttf -o "${FONTPATH}/Hack Bold Nerd Font Complete.ttf"
|
||||
packr -v
|
||||
|
||||
.PHONY: release
|
||||
release: test install-tools
|
||||
./scripts/release.sh
|
||||
|
||||
.PHONY: build-linux
|
||||
build-linux: test install-tools
|
||||
mkdir -p bin
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -o bin/aminal-linux-amd64
|
||||
|
||||
.PHONY: build-darwin
|
||||
build-darwin: test install-tools
|
||||
mkdir -p bin
|
||||
xgo --targets=darwin/amd64 --dest=bin -out ${BINARY}-darwin-amd64 .
|
||||
|
||||
|
||||
|
|
|
@ -1,22 +1,6 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
BINARY=aminal
|
||||
|
||||
if [[ "${CIRCLE_TAG}" == "" ]]; then
|
||||
exit 0 # no tag, nothing to release
|
||||
fi
|
||||
mkdir -p release/bin/darwin/amd64/
|
||||
mkdir -p release/bin/linux/amd64/
|
||||
mkdir -p release/bin/linux/i386/
|
||||
|
||||
# build for osx using xgo - this cannot be used for linux builds due to missing deps in the xgo containers
|
||||
# xgo --targets=darwin/amd64 --dest=release/bin/darwin/amd64 -out ${BINARY} .
|
||||
|
||||
GOOS=linux GOARCH=386 CGO_ENABLED=1 go build -o release/bin/linux/i386/aminal
|
||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 go build -o release/bin/linux/amd64/aminal
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
git tag "${VERSION}"
|
||||
|
|
Loading…
Reference in New Issue