-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 1.21 KB
/
Makefile
File metadata and controls
40 lines (31 loc) · 1.21 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
APP_VERSION = $(shell git describe --abbrev=0 --tags)
GIT_COMMIT = $(shell git rev-parse --short HEAD)
BUILD_DATE = $(shell date -u "+%Y%m%d-%H%M")
VERSION_PKG = github.com/Helios-Chain-Labs/hyperion/orchestrator/version
IMAGE_NAME := gcr.io/helios-core/hyperion
DOCKER ?= false
all:
image:
docker build --build-arg GIT_COMMIT=$(GIT_COMMIT) -t $(IMAGE_NAME):local -f Dockerfile .
docker tag $(IMAGE_NAME):local $(IMAGE_NAME):$(GIT_COMMIT)
docker tag $(IMAGE_NAME):local $(IMAGE_NAME):latest
push:
docker push $(IMAGE_NAME):$(GIT_COMMIT)
docker push $(IMAGE_NAME):latest
install: export GOPROXY=direct
install: export VERSION_FLAGS="-X $(VERSION_PKG).GitCommit=$(GIT_COMMIT) -X $(VERSION_PKG).BuildDate=$(BUILD_DATE)"
install:
@$(DOCKER) && go install -tags muslc -ldflags $(VERSION_FLAGS) ./cmd/... || go install -ldflags $(VERSION_FLAGS) ./cmd/...
@echo "hyperion command line installed in your go path"
.PHONY: install image push test gen
start:
hyperion orchestrator
test:
# go clean -testcache
go test ./orchestrator/...
copy-wrappers:
@rm -rf ./solidity
@mkdir ./solidity
@cp -R ../Ethereum-Bridge-Contract/wrappers ./solidity/wrappers
monitor:
(export $$(cat .env | xargs) && sh ./monitor/monitor_hyperion.sh)