-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (39 loc) · 1.3 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
-include .env
VERSION ?= $(shell git rev-parse --short HEAD)
ifneq ($(shell git status --porcelain),)
VERSION := $(VERSION)-dirty
endif
clean:
rm -rf ./bin/* ./dist/*
tfarm:
go build \
-ldflags="-X 'github.com/cbodonnell/tfarm/pkg/version.Version=${VERSION}'" \
-o ./bin/tfarm ./cmd/tfarm/main.go
tfarm-server-start: tfarm
TFARMD_FRPC_BIN_PATH=${TFARMD_FRPC_BIN_PATH} \
TFARMD_WORK_DIR=${TFARMD_WORK_DIR} \
TFARMD_LOG_LEVEL=${TFARMD_LOG_LEVEL} \
./bin/tfarm server start \
--frps-server-addr=localhost \
--frps-server-port=7000 \
--frpc-log-level ${TFARMD_LOG_LEVEL}
tfarm-server-start-dev: tfarm
TFARMD_FRPC_BIN_PATH=${TFARMD_FRPC_BIN_PATH} \
TFARMD_WORK_DIR=${TFARMD_DEV_WORK_DIR} \
TFARMD_LOG_LEVEL=${TFARMD_LOG_LEVEL} \
./bin/tfarm server start \
--frpc-log-level ${TFARMD_LOG_LEVEL}
tfarm-server-configure-dev: tfarm
TFARMD_WORK_DIR=${TFARMD_DEV_WORK_DIR} \
./bin/tfarm server configure
tfarm-server-certs-regenerate: tfarm
TFARMD_WORK_DIR=${TFARMD_WORK_DIR} \
./bin/tfarm server certs regenerate
trivy-fs:
trivy fs --scanners vuln --ignore-unfixed .
tag:
git tag -a $(version) -m "Release $(version)" && git push origin $(version)
release: clean
goreleaser release -f ./deploy/.goreleaser.yaml --clean
release-snapshot: clean
goreleaser release -f ./deploy/.goreleaser.yaml --snapshot