forked from klismannsm/github-authorized-keys
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (47 loc) · 1.41 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
51
52
53
54
55
56
57
58
59
# Suported platforms for compilation
RELEASE_ARCH += darwin/386
RELEASE_ARCH += darwin/amd64
RELEASE_ARCH += linux/386
RELEASE_ARCH += linux/amd64
RELEASE_ARCH += linux/arm
RELEASE_ARCH += linux/arm64
RELEASE_ARCH += freebsd/386
RELEASE_ARCH += freebsd/amd64
RELEASE_ARCH += freebsd/arm
RELEASE_ARCH += netbsd/386
RELEASE_ARCH += netbsd/amd64
RELEASE_ARCH += netbsd/arm
RELEASE_ARCH += openbsd/386
RELEASE_ARCH += openbsd/amd64
APP := github-authorized-keys
BUILD_FOR := arm64 amd64
COPYRIGHT_SOFTWARE := Github Authorized Keys
COPYRIGHT_SOFTWARE_DESCRIPTION := Use GitHub teams to manage system user accounts and authorized_keys
export DOCKER_IMAGE_NAME = terjekv/$(APP)
# include $(shell curl -so .build-harness "https://raw.githubusercontent.com/cloudposse/build-harness/master/templates/Makefile.build-harness"; echo .build-harness)
## Execute local build
build:
for arch in $(BUILD_FOR); do GOOS=linux GOARCH=$$arch go build -o release/github-authorized-keys.$${arch}; done
## $(SELF) go:build
## Execute local deps
deps:
go get .
clean:
rm -rf release
go:
$(SELF) build
## Docker buildx
docker:
docker buildx build --platform=linux/arm64,linux/amd64 .
## Execute all targets
all:
# $(SELF) go:deps-dev
# $(SELF) go:deps-build
$(SELF) deps
# $(SELF) go:lint
# $(SELF) go:test
# $(SELF) go:build-all
$(SELF) build
## Bring up docker compose environment
compose-up:
docker-compose -f docker-compose-test.yaml up -d