-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (22 loc) · 886 Bytes
/
Makefile
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
29
30
REPO=docker.io/erwinvaneyk
IMAGE=simfission
VERSION=latest
.PHONY: publish test build install
build:
CGO_ENABLED=0 go build \
-gcflags=-trimpath="/go/src/github.com/erwinvaneyk/simfaas" \
-asmflags=-trimpath="/go/src/github.com/erwinvaneyk/simfaas" \
-ldflags "-X \"main.buildTime=$(date)\" " \
$(CURDIR)/cmd/simfission
install:
CGO_ENABLED=0 go install \
-gcflags=-trimpath="/go/src/github.com/erwinvaneyk/simfaas" \
-asmflags=-trimpath="/go/src/github.com/erwinvaneyk/simfaas" \
-ldflags "-X \"main.buildTime=$(shell date)\" " \
$(CURDIR)/cmd/simfission
docker-build: simfaas.go cmd/simfission/simfission.go Dockerfile
docker build --tag="${REPO}/${IMAGE}:${VERSION}" .
publish: docker-build
docker push "${REPO}/${IMAGE}:${VERSION}"
serve: docker-build
docker run --rm -p 8888:8888 "${REPO}/${IMAGE}:${VERSION}"