-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
49 lines (39 loc) · 1.71 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
BRANCH ?= "master"
VERSION ?= $(shell cat ./VERSION)
DEFAULT: start
attach-to-neo-python-client:
@./scripts/print.sh prefix "Attaching terminal to neo-python client\n"
@./scripts/print.sh grey "Open wallet (password: 'coz'):\t wallet open neo-privnet.wallet"
@./scripts/print.sh grey "Test smart contract:\t\t sc build_run /smart-contracts/wake_up_neo.py True False False 07 05 main\n"
@docker exec -it neo-python np-prompt -p -v
# IGNORE - used to check if version has been bumped on CI.
check-version:
@echo "=> Checking if VERSION exists as Git tag..."
(! git rev-list ${VERSION})
# IGNORE - used to test project on CI.
integration-tests: setup-network
@./scripts/print.sh prefix "Checking number of running services"
@./scripts/status.sh
# IGNORE - used to release new version of project to Git.
push-tag:
@echo "=> New tag version: ${VERSION}"
git checkout ${BRANCH}
git pull origin ${BRANCH}
git tag ${VERSION}
git push origin ${BRANCH} --tags
pull-images:
@./scripts/print.sh prefix "Fetching Docker containers..."
@./scripts/print.sh prefix "The first time you run, it will take a while to pull/build neo-cli-privatenet (1 to 4) images..."
@docker-compose pull > /dev/null
setup-network:
@./scripts/print.sh prefix "Starting Docker containers..."
@docker-compose up -d --build --force-recreate --remove-orphans > /dev/null
@./scripts/print.sh prefix "Waiting for network..." false
@./scripts/ping.sh
@./scripts/print.sh prefix "Network running! 🎉"
start: pull-images setup-network attach-to-neo-python-client
start-offline: setup-network attach-to-neo-python-client
stop:
@./scripts/print.sh prefix "Stopping Docker containers..."
@docker-compose down > /dev/null
@./scripts/print.sh prefix "Done 🎉"