61 lines
1.7 KiB
Makefile
61 lines
1.7 KiB
Makefile
FROSTFS_VERSION?=0.42.9
|
|
FROSTFS_CONTRACTS_VERSION=0.19.4
|
|
NEOGO_VERSION?=0.104.0
|
|
|
|
SHELL=/bin/bash
|
|
.SHELLFLAGS=-euo pipefail -c
|
|
|
|
.PHONY: up
|
|
up: morph
|
|
|
|
WALLET?=wallet/morph.json
|
|
TOOLS=$(NEOGO) $(ADM) $(CLI)
|
|
|
|
ADM?=bin/frostfs-adm-v$(FROSTFS_VERSION)
|
|
ADM_RELEASE_URL=https://git.frostfs.info/TrueCloudLab/frostfs-node/releases/download/v$(FROSTFS_VERSION)/frostfs-adm
|
|
|
|
CLI?=bin/frostfs-cli-v$(FROSTFS_VERSION)
|
|
CLI_RELEASE_URL=https://git.frostfs.info/TrueCloudLab/frostfs-node/releases/download/v$(FROSTFS_VERSION)/frostfs-cli
|
|
|
|
NEOGO?=bin/neo-go-v$(NEOGO_VERSION)
|
|
NEOGO_RELEASE_URL=https://github.com/nspcc-dev/neo-go/releases/download/v$(NEOGO_VERSION)/neo-go-linux-amd64
|
|
|
|
bin/frostfs-adm-v$(FROSTFS_VERSION):
|
|
mkdir -p $(dir $@)
|
|
wget -q "$(ADM_RELEASE_URL)" -O "$@"
|
|
chmod +x "$@"
|
|
|
|
bin/frostfs-cli-v$(FROSTFS_VERSION):
|
|
mkdir -p $(dir $@)
|
|
wget -q "$(CLI_RELEASE_URL)" -O "$@"
|
|
chmod +x "$@"
|
|
|
|
bin/neo-go-v$(NEOGO_VERSION):
|
|
mkdir -p $(dir $@)
|
|
wget -q "$(NEOGO_RELEASE_URL)" -O "$@"
|
|
chmod +x "$@"
|
|
|
|
.PHONY: morph
|
|
morph: $(WALLET) | $(NEOGO)
|
|
mkdir -p log
|
|
$(NEOGO) node --config-path . --privnet --debug 2>&1 | tee --append log/$@
|
|
|
|
wallet/morph.json: wallet.template | $(NEOGO)
|
|
mkdir -p $(dir $@)
|
|
$(NEOGO) wallet init --account --wallet-config $<
|
|
|
|
.PHONY: bootstrap
|
|
bootstrap: data/contracts wallet/az.json | $(ADM)
|
|
$(ADM) morph init --contracts $< --alphabet-wallets wallet --rpc-endpoint http://localhost:30333
|
|
|
|
wallet/az.json: | $(ADM)
|
|
mkdir -p wallet
|
|
cd wallet; $(abspath $(ADM)) morph generate-alphabet --size 1 --verbose
|
|
|
|
data/contracts: | $(NEOGO)
|
|
mkdir -p $(dir $@)
|
|
git clone https://git.frostfs.info/TrueCloudLab/frostfs-contract \
|
|
--branch=v$(FROSTFS_CONTRACTS_VERSION) \
|
|
--depth=1 --single-branch \
|
|
$@
|
|
$(MAKE) -C $@ all NEOGO=$(abspath $(NEOGO))
|