forked from axelarnetwork/tofnd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (24 loc) · 888 Bytes
/
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
.PHONY: docker-image
docker-image: git-submodule-setup
@DOCKER_BUILDKIT=1 docker build --ssh default -t axelar/tofnd .
.PHONY: docker-image-malicious
docker-image-malicious: git-submodule-setup
@DOCKER_BUILDKIT=1 docker build --ssh default --build-arg features="malicious" -t axelar/tofnd-malicious .
.PHONY: copy-binary
copy-binary-from-image: guard-SEMVER
./scripts/copy-binaries-from-image.sh
mv bin/tofnd bin/tofnd-linux-amd64-${SEMVER}
cd bin && sha256sum * > SHA256SUMS
.PHONY: upload-binaries-to-s3
upload-binaries-to-s3: guard-S3_PATH
aws s3 cp ./bin ${S3_PATH}/ --recursive
.PHONY: docker-image-all
docker-image-all: git-submodule-setup
make docker-image
make docker-image-malicious
.PHONY: git-submodule-setup
git-submodule-setup:
git submodule init
git submodule update
guard-%:
@ if [ -z '${${*}}' ]; then echo 'Environment variable $* not set' && exit 1; fi