forked from dstotijn/hetty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (29 loc) · 856 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
31
32
33
PACKAGE_NAME := github.com/dstotijn/hetty
GOLANG_CROSS_VERSION ?= v1.16.3
.PHONY: build-admin
build-admin:
NEXT_TELEMETRY_DISABLED=1 cd admin && yarn install && yarn run export
.PHONY: build
build: build-admin
CGO_ENABLED=1 mv admin/dist cmd/hetty/admin && go build ./cmd/hetty
.PHONY: release-dry-run
release-dry-run: build-admin
@docker run \
--rm \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
troian/golang-cross:${GOLANG_CROSS_VERSION} \
--rm-dist --skip-validate --skip-publish
.PHONY: release
release: build-admin
@if [ ! -f ".release-env" ]; then \
echo "\033[91mFile \`.release-env\` is missing.\033[0m";\
exit 1;\
fi
@docker run \
--rm \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-w /go/src/$(PACKAGE_NAME) \
--env-file .release-env \
troian/golang-cross:${GOLANG_CROSS_VERSION} \
release --rm-dist