-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
68 lines (51 loc) · 1.68 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
63
64
65
66
67
68
GENESIS_DEST_DIR ?= $(CACHE_DIR)/$(CURRENT_UPGRADE)
GENESIS_DEST := $(GENESIS_DEST_DIR)/genesis.json
GENESIS_ORIG ?= $(GENESIS_DEST_DIR)/genesis.orig.json
LZ4_ARCHIVE ?= $(GENESIS_DEST_DIR)/genesis.json.tar.lz4
export GENESIS_ORIG
CHAIN_TOKEN_DENOM := uakt
CHAIN_VALIDATOR_AMOUNT := 20000000000000000
CHAIN_VALIDATOR_DELEGATE := 15000000000000000
cache_init := $(CACHE_DIR)/.init
.PHONY: cache
cache: $(cache_init)
.PHONY: init
init: $(cache_init) $(AKASH) $(test_key)
.PRECIOUS: %/.init
%/.init:
@echo "creating dir structure..."
mkdir -p ${@D}
mkdir -p $(CACHE_BIN)
mkdir -p $(AKASH_HOME)
touch $@
$(AKASH): $(cache_init)
@echo "Installing akash $(BINARY_VERSION) ..."
mkdir -p $(BIN_DIR)
curl -sfL https://raw.githubusercontent.com/akash-network/node/master/install.sh | bash -s -- -b $(BIN_DIR) $(BINARY_VERSION)
.PHONY: install
install: $(AKASH)
$(GENESIS_DEST_DIR):
mkdir -p $(GENESIS_DEST_DIR)
testnetify: $(AKASH) $(GENESIS_DEST_DIR)
$(AKASH) debug testnetify $(GENESIS_ORIG) $(GENESIS_DEST) -c config-$(CURRENT_UPGRADE).json
archive: testnetify
(cd $(GENESIS_DEST_DIR); $(TAR) cvf - genesis.json | lz4 -f - $(LZ4_ARCHIVE))
.PHONY: clean
clean:
rm -rf $(CACHE_DIR)
$(TESTNETIFY_CONFIG): $(GENESIS_BINARY) $(GOMPLATE) $(GENESIS_CONFIG_TEMPLATE)
$(ROOT_DIR)/scripts/testnetify-render-config.sh \
$(GENESIS_BINARY) \
$(KEY_NAME) \
config-$(UPGRADE_TO).tmpl.json \
$(TESTNETIFY_CONFIG)
$(GENESIS_ORIG): $(AKASH)
./run.sh
.PHONY: run
run: $(AKASH) $(GENESIS_DEST_DIR) $(GENESIS_ORIG) archive
.PHONY: lz4
lz4:
@echo "$(LZ4_ARCHIVE)"
.PHONY: release
release:
gh release upload $(CURRENT_UPGRADE) $(LZ4_ARCHIVE) --clobber