forked from intelops/capten
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (36 loc) · 1.29 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
.PHONY: build
build:
go mod tidy
go mod vendor
go build -o capten ./cmd/main.go
.PHONY: build.all
build.all:
@echo "👷👷 Building Capten CLI"
@rm -rf capten
@mkdir capten
@go mod download && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o capten/capten cmd/main.go
# @go mod download && GOOS=darwin GOARCH=amd64 go build -o capten/capten.app cmd/main.go
# @go mod download && GOOS=windows GOARCH=amd64 go build -o capten/capten.exe cmd/main.go
.PHONY: build.release
build.release: build.all
@echo "👷👷 Building release ..."
@mkdir capten/config capten/cert capten/terraform_modules capten/apps capten/templates
# move configs
@cp -rf config/* capten/config/
# move templates
@cp -rf templates/* capten/templates/
# git pull dataplane repo, versioning needs to be confirmed
@git clone https://github.com/kube-tarian/controlplane-dataplane.git
@cp -rf controlplane-dataplane/* capten/terraform_modules/
@rm -rf controlplane-dataplane
# move apps
@mkdir capten/apps/values
@cp -rf apps/* capten/apps/
# copy readme
@cp README.md capten/README.md
# make all scripts executable
@find ./capten/ -type f -name "*.sh" -exec chmod +x {} \;
@zip -r capten.zip capten/*
# remove this release folder as ci pipeline is complaining
@rm -rf capten
@echo "✅ Release Build Complete ✅"