-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
43 lines (31 loc) · 974 Bytes
/
Copy pathmakefile
File metadata and controls
43 lines (31 loc) · 974 Bytes
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
include ./globals.mk
ENV := "dev"
changelog: ## Generates the changelog
npm run changelog
node_modules: package.json
npm ci
dist: node_modules
npm run build
.PHONY: deploy_sites
deploy_sites: example-site/build dist ## Deploy to firebase
firebase -P malwoden-$(ENV) deploy
example-site/build:
cd example-site
npm ci
npm install ..
npm run build
tf_init: ## Initializes terraform
cd ./infra/terraform
rm -rf .terraform
terraform init -backend-config="../envs/$(ENV).backend.config"
tf_plan: ## Plans terraform
cd ./infra/terraform
terraform plan -var-file="../envs/$(ENV).tfvars"
tf_apply: ## Applies terraform
cd ./infra/terraform
terraform apply -var-file="../envs/$(ENV).tfvars"
npm_push: dist ## Deploys the library to npm with the next tag
npm publish --tag next
npm_release: dist ## Adds the latest tag to the current npm pkg
VERSION=$$(node -e "console.log(require('./package.json').version);")
npm dist-tag add malwoden@$$VERSION latest