mirror of https://github.com/liamg/aminal.git
homebrew preparation
This commit is contained in:
parent
f89e60e130
commit
8d8e9166ab
|
@ -103,3 +103,4 @@ workflows:
|
|||
only: /^v.*/
|
||||
branches:
|
||||
ignore: /.*/
|
||||
|
||||
|
|
3
Makefile
3
Makefile
|
@ -4,8 +4,7 @@ FONTPATH := ./gui/packed-fonts
|
|||
|
||||
.PHONY: build
|
||||
build: test install-tools
|
||||
packr -v
|
||||
go build -ldflags "-X github.com/liamg/aminal/version.Version=`git describe --tags`"
|
||||
./build.sh `git describe --tags`
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
|
||||
version="$1"
|
||||
|
||||
if [[ "$version" == "" ]]; then
|
||||
version=`git describe --tags`
|
||||
fi
|
||||
|
||||
if [[ "$version" == "" ]]; then
|
||||
echo "Error: Cannot determine version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export GOPATH="/tmp/.gobuild"
|
||||
SRCDIR="${GOPATH}/src/github.com/liamg/aminal"
|
||||
|
||||
[ -d ${GOPATH} ] && rm -rf ${GOPATH}
|
||||
mkdir -p ${GOPATH}/{src,pkg,bin}
|
||||
mkdir -p ${SRCDIR}
|
||||
cp -r . ${SRCDIR}
|
||||
(
|
||||
echo ${GOPATH}
|
||||
cd ${SRCDIR}
|
||||
go install -ldflags "-X github.com/liamg/aminal/version.Version=$version"
|
||||
)
|
||||
|
Loading…
Reference in New Issue