-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (30 loc) · 1.07 KB
/
Makefile
File metadata and controls
37 lines (30 loc) · 1.07 KB
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
APPNAME=buildkite-cache
STAGE=dev
COVERAGE_FILE := coverage.out
# Help target
.PHONY: help
help: ## Show this help message
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " %-15s %s\n", $$1, $$2}'
.PHONY: cache-bucket
cache-bucket: ## Deploy the cache bucket stack
@echo "--- deploy stack $(APPNAME)-$(STAGE)-cache-bucket"
@sam deploy \
--no-fail-on-empty-changeset \
--template-file sam/app/cache-bucket.cfn.yml \
--capabilities CAPABILITY_IAM \
--tags "environment=$(STAGE)" "application=$(APPNAME)" \
--stack-name $(APPNAME)-$(STAGE)-cache-bucket \
--parameter-overrides AppName=$(APPNAME) Stage=$(STAGE) CachePrefix=cache
.PHONY: lint
lint: ## Run linter
golangci-lint run ./...
.PHONY: lint-fix
lint-fix: ## Run linter with auto-fix
golangci-lint run --fix ./...
.PHONY: snapshot
snapshot: ## Build snapshot with goreleaser
goreleaser build --snapshot --clean --single-target
.PHONY: test
test: ## Run tests with coverage
go test -coverprofile $(COVERAGE_FILE) -covermode atomic -v ./...