-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (44 loc) · 1.31 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
RELEASE_VERSION :=$(shell cat .version)
## Variable assertions
ifndef RELEASE_VERSION
$(error RELEASE_VERSION is not set)
endif
all: help
.PHONY: version
version: ## Prints the current version
@echo $(RELEASE_VERSION)
.PHONY: image
image: ## Creates the runner image
scripts/img
.PHONY: init
init: ## Runs terraform fmt on all terraform files
terraform -chdir=./deployments init
.PHONY: valid
valid: ## Applies Terraform
terraform -chdir=./deployments fmt
terraform -chdir=./deployments validate
.PHONY: apply
apply: valid ## Applies Terraform
terraform -chdir=./deployments apply -auto-approve
.PHONY: refresh
refresh: ## Destroy Terraform
terraform -chdir=./deployments refresh
.PHONY: destroy
destroy: ## Destroy Terraform
terraform -chdir=./deployments destroy
scripts/runner-remove
.PHONY: jobless
jobless: ## Cancels all running jobs
scripts/job-cancel
.PHONY: tag
tag: ## Creates release tag
git tag -s -m "release $(RELEASE_VERSION)" $(RELEASE_VERSION)
git push origin $(RELEASE_VERSION)
.PHONY: tagless
tagless: ## Delete the current release tag
git tag -d $(RELEASE_VERSION)
git push --delete origin $(RELEASE_VERSION)
.PHONY: help
help: ## Display available commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk \
'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'