Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #68 from icon-project/develop
Browse files Browse the repository at this point in the history
RC2.0.0
  • Loading branch information
June Park authored Jan 29, 2019
2 parents 0466bb3 + 769fe55 commit cf7408d
Show file tree
Hide file tree
Showing 63 changed files with 1,077 additions and 1,529 deletions.
57 changes: 57 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
requirements:
@command -v automake > /dev/null || echo "Error: automake is not installed."
@command -v pkg-config > /dev/null || echo "Error: pkg-config is not installed."
@command -v libtool > /dev/null || echo "Error: libtool is not installed."
@command -v openssl > /dev/null || echo "Error: openssl is not installed."
@if [ "$$(ps -e | grep '[r]abbitmq-server')" = "" ]; then\
echo "Rabbitmq server is not running locally.";\
fi

install:
pip3 install git+https://github.com/icon-project/icon-service.git@master
pip3 install git+https://github.com/icon-project/icon-commons.git@master
pip3 install git+https://github.com/icon-project/icon-rpc-server.git@master
pip3 install tbears
pip3 install -e .

setup: generate-proto generate-key

generate-proto:
@echo "Generating python grpc code from proto into > " `pwd`
python3 -m grpc.tools.protoc -I'./loopchain/protos' --python_out='./loopchain/protos' --grpc_python_out='./loopchain/protos' './loopchain/protos/loopchain.proto'

generate-key:
@mkdir -p resources/my_pki
@echo "Generating private key...."
openssl ecparam -genkey -name secp256k1 | openssl ec -aes-256-cbc -out ./resources/my_pki/my_private.pem
@echo ""
@echo "Generating public key from private key...."
openssl ec -in ./resources/my_pki/my_private.pem -pubout -out ./resources/my_pki/my_public.pem

check:
@echo "Check Python & Gunicorn & RabbitMQ Process..."
ps -ef | grep loop
ps -ef | grep gunicorn
rabbitmqctl list_queues

test:
@python3 -m unittest discover testcase/unittest/ -p "test_*.py" || exit -1

clean: clean-mq clean-pyc

clean-mq:
@echo "Cleaning up RabbitMQ..."
@rabbitmqctl stop_app
@rabbitmqctl reset
@rabbitmqctl start_app

clean-pyc:
@echo "Clear __pycache__"
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +

clean-db:
@echo "Cleaning up all DB and logs..."
rm -rf .storage*
rm -rf log/
Loading

0 comments on commit cf7408d

Please sign in to comment.