-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (36 loc) · 1.01 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
PARAMS = $(filter-out $@,$(MAKECMDGOALS))
# Ignore `No rule to make target` errors
%:
@echo ""
# Install development tools
tools:
@GO111MODULE=off go get -u github.com/codegangsta/gin
@GO111MODULE=off go get -u github.com/andybar2/team
.PHONY: tools
# Install vendor dependencies
deps:
@go mod tidy
@go mod download
@go mod vendor
.PHONY: deps
# Run development environment
dev:
@mkdir -p .team/development
@team env print -s "development" > .team/development/env
@team files download -s "development" -p ".team/development/firebase-service-account.json"
@up start
.PHONY: dev
# Deploy production environment
production:
@read -p "Do you really want to deploy to production? (y/n) " RESP; \
if [ "$$RESP" = "y" ]; then \
mkdir -p .team/production; \
team env print -s "production" > .team/production/env; \
team files download -s "production" -p ".team/production/firebase-service-account.json"; \
up deploy production; \
fi
.PHONY: production
# Stack management
stack:
@up stack ${PARAMS}
.PHONY: stack