Skip to content

Commit

Permalink
makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Oct 11, 2021
1 parent 8554321 commit 33bb001
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ reset:
backup:
cd ~ && rsync -av --exclude db/ --exclude logs/ ~/.0L ~/0L_backup_$(shell date +"%m-%d-%y")

clear-prod-db:
@echo WIPING DB
rm -rf ${DATA_PATH}/db | true
@echo BACKING UP KEYSTORE FILE
mv ${DATA_PATH}/key_store.json ${DATA_PATH}/key_store.json.bak | true

#### GENESIS BACKEND SETUP ####
init-backend:
curl -X POST -H "Authorization: token ${GITHUB_TOKEN}" https://api.github.com/orgs/${REPO_ORG}/repos -d '{"name":"${REPO_NAME}", "private": "true", "auto_init": "true"}'
Expand Down Expand Up @@ -280,6 +286,7 @@ genesis:
--github-org ${REPO_ORG} \
--layout-path ${DATA_PATH}/set_layout.toml

sha256sum ${DATA_PATH}/genesis.blob

#### NODE MANAGEMENT ####
start:
Expand Down Expand Up @@ -477,7 +484,17 @@ clean-tags:
git push origin --delete ${TAG}
git tag -d ${TAG}

nuke-testnet:
@echo WIPING EVERYTHING but keeping: github_token.txt, autopay_batch.json, set_layout.toml, /blocks/block_0.json

@if test -d ${DATA_PATH}; then \
cd ${DATA_PATH} && cp github_token.txt autopay_batch.json set_layout.toml blocks/block_0.json ~/; \
cd ${DATA_PATH} && rm -rf *; \
cd ~ && cp github_token.txt autopay_batch.json set_layout.toml ${DATA_PATH}; \
cd ${DATA_PATH} && mkdir blocks;\
cd ~ && cp block_0.json ${DATA_PATH}/blocks/; \
fi


####### SWARM ########

Expand Down Expand Up @@ -533,16 +550,3 @@ fork-start:
rm -rf ~/.0L/db
cargo run -p libra-node -- --config ~/.0L/validator.node.yaml


nuke-testnet:
@echo WIPING EVERYTHING but keeping: github_token.txt, autopay_batch.json, set_layout.toml, /blocks/block_0.json

@if test -d ${DATA_PATH}; then \
cd ${DATA_PATH} && cp github_token.txt autopay_batch.json set_layout.toml blocks/block_0.json ~/; \
cd ${DATA_PATH} && rm -rf *; \
cd ~ && cp github_token.txt autopay_batch.json set_layout.toml ${DATA_PATH}; \
cd ${DATA_PATH} && mkdir blocks;\
cd ~ && cp block_0.json ${DATA_PATH}/blocks/; \
fi


0 comments on commit 33bb001

Please sign in to comment.