-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (50 loc) · 1.93 KB
/
Makefile
File metadata and controls
66 lines (50 loc) · 1.93 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#####################################################
# Makefile containing shortcut commands for project #
#####################################################
# MACOS USERS:
# Make should be installed with XCode dev tools.
# If not, run `xcode-select --install` in Terminal to install.
# WINDOWS USERS:
# 1. Install Chocolately package manager: https://chocolatey.org/
# 2. Open Command Prompt in administrator mode
# 3. Run `choco install make`
# 4. Restart all Git Bash/Terminal windows.
.PHONY: tf-init
tf-init:
docker-compose -f deploy/docker-compose.yml run --rm terraform init
.PHONY: tf-fmt
tf-fmt:
docker-compose -f deploy/docker-compose.yml run --rm terraform fmt
.PHONY: tf-validate
tf-validate:
docker-compose -f deploy/docker-compose.yml run --rm terraform validate
.PHONY: tf-plan
tf-plan:
docker-compose -f deploy/docker-compose.yml run --rm terraform plan
.PHONY: tf-apply
tf-apply:
docker-compose -f deploy/docker-compose.yml run --rm terraform apply
.PHONY: tf-destroy
tf-destroy:
docker-compose -f deploy/docker-compose.yml run --rm terraform destroy
.PHONY: tf-workspace-list
tf-workspace-list:
docker-compose -f deploy/docker-compose.yml run --rm terraform workspace list
.PHONY: tf-workspace-dev
tf-workspace-dev:
docker-compose -f deploy/docker-compose.yml run --rm terraform workspace select dev
.PHONY: tf-workspace-staging
tf-workspace-staging:
docker-compose -f deploy/docker-compose.yml run --rm terraform workspace select staging
.PHONY: tf-workspace-prod
tf-workspace-prod:
docker-compose -f deploy/docker-compose.yml run --rm terraform workspace select prod
.PHONY: test
test:
docker-compose run --rm app sh -c "python manage.py wait_for_db && python manage.py makemigrations && python manage.py test && flake8"
.PHONY: production
production:
git pull origin && git checkout master &&
git checkout production &&
GIT_MERGE_AUTOEDIT=no git merge origin/master &&
git push origin && git checkout master