Skip to content

Commit

Permalink
Merge pull request #72 from xian-network/crosschainer-patch-14
Browse files Browse the repository at this point in the history
Update Makefile
  • Loading branch information
crosschainer authored Apr 5, 2024
2 parents fd199cc + 56f6442 commit 09455aa
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,38 @@
.PHONY: update_system install_packages clone_repos setup_venv download_cometbft configure_node_local install test dev clean wipe up down restart init node-id dwu pull pull-and-install

update_system:
sudo apt-get update
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt-get update

install_packages:
sudo apt-get install pkg-config python3.11 python3.11-dev python3.11-venv libhdf5-dev build-essential

clone_repos:
git clone https://github.com/xian-network/xian-core.git
cd xian-core && git clone https://github.com/xian-network/contracting.git

setup_venv:
cd xian-core && python3.11 -m venv xian_venv
cd xian-core && source xian_venv/bin/activate && pip install -e contracting/ -e .

download_cometbft:
wget https://github.com/cometbft/cometbft/releases/download/v0.38.6/cometbft_0.38.6_linux_amd64.tar.gz
tar -xf cometbft_0.38.6_linux_amd64.tar.gz
rm cometbft_0.38.6_linux_amd64.tar.gz
./cometbft init

configure_node_local:
cd xian-core && source xian_venv/bin/activate && python src/xian/tools/configure.py --moniker "Node" --copy-genesis True --genesis-file-name genesis.json --validator-privkey "cd6cc45ffe7cebf09c6c6025575d50bb42c6c70c07e1dbc5150aaadc98705c2b"

install: update_system install_packages clone_repos setup_venv download_cometbft configure_node_local
@echo "Installation and setup for local node completed. Use 'make up' to start the node and 'make down' to stop it."

test:
pytest .

dev:
pip install --editable '.[dev]'
cd xian-core && source xian_venv/bin/activate && pip install --editable '.[dev]'

clean:
@rm -Rf dist/
Expand Down Expand Up @@ -37,13 +66,9 @@ dwu:
make up

pull:
cd ./contracting && git pull && cd ..
cd ./xian-core/contracting && git pull && cd ../..
git pull

install:
pip install -e ./contracting
pip install -e .

pull-and-install:
make pull
make install

0 comments on commit 09455aa

Please sign in to comment.