This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from icon-project/develop
RC2.0.0
- Loading branch information
Showing
63 changed files
with
1,077 additions
and
1,529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
Oops, something went wrong.