-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
28 lines (21 loc) 路 693 Bytes
/
Copy pathmakefile
File metadata and controls
28 lines (21 loc) 路 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
export ARTIFACT:=feeder
export SHELL:=/usr/bin/env bash -O extglob -c
export GO111MODULE:=on
export OS:=$(shell uname | tr '[:upper:]' '[:lower:]')
clean:
rm -fv ${ARTIFACT}
build: GOOS ?= ${OS}
build: GOARCH ?= amd64
build: clean
GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 go build .
release-linux:
GOOS=linux $(MAKE) build
tar Jcf ${ARTIFACT}-`git describe --abbrev=0 --tags`-linux-amd64.txz ${ARTIFACT}
release-darwin:
GOOS=darwin $(MAKE) build
tar Jcf ${ARTIFACT}-`git describe --abbrev=0 --tags`-darwin-amd64.txz ${ARTIFACT}
release: clean release-linux release-darwin
run: build
./${ARTIFACT} -config ~/.config/feeder/config.yml
test: build
go test -v -vet=all -failfast