-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (49 loc) · 1.12 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
58
59
60
61
62
DIR_BUILD := target
DIR_RELEASE := ${DIR_BUILD}/release
TF_DIR := ./deploy
.DEFAULT_GOAL := all
.PHONY: all
all : build test install
.PHONY: init
init :
rustup toolchain install nightly
rustup override set nightly
rustup component add clippy
rustup component add rustfmt
cargo install cargo-watch
cargo install cargo-edit
cargo install cargo-tarpaulin
cargo install cargo-audit
.PHONY: build
build ${DIR_RELEASE}/tradingbot :
cargo build --verbose
.PHONY: test
test :
cargo test --verbose
.PHONY: check
check :
cargo fmt
cargo clippy
.PHONY: install
install :
cargo install --path .
.PHONY: watch
watch :
cargo-watch -x "test && cargo rustdoc"
.PHONY: tf-setup
tf-setup tf-setup.zip terraform :
wget https://releases.hashicorp.com/terraform/0.12.28/terraform_0.12.28_linux_amd64.zip -O tf-setup.zip
touch $@
unzip -o tf-setup.zip
chmod +x terraform
./terraform --version
.PHONY: tf-init
tf-init : terraform
./terraform init ${TF_DIR}
.PHONY: tf-plan
tf-plan : | tf-init
./terraform plan ${TF_DIR}
tf-apply : | tf-init
./terraform apply ${TF_DIR}
tf-destroy : | tf-init
./terraform destroy ${TF_DIR}