Skip to content

Commit

Permalink
dynamic path generation
Browse files Browse the repository at this point in the history
  • Loading branch information
walmon committed Jan 4, 2019
1 parent 92739bf commit 0394ea8
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -9,4 +9,5 @@ npm-debug.log*
# Mac
.DS_Store

dist
dist
.convector-dev-env
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions scripts/clean.sh
@@ -1,4 +1,5 @@
#!/bin/bash
ROOT_DIR=$1
CONVECTOR_DIR="${CONVECTOR_DIR:-$PWD/.convector-dev-env}"

docker rm -f $(docker ps -a | awk '$2~/hyperledger/ {print $1}') $(docker ps -a | awk '{ print $1,$2 }' | grep dev-peer | awk '{print $1 }') || true
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate.sh
@@ -1,5 +1,5 @@
#!/bin/bash
ROOT_DIR=$(dirname "${0}")/..
ROOT_DIR=$1
BIN=$ROOT_DIR/bin
CONFIG=$ROOT_DIR/config
NETWORK_OBJECTS=$ROOT_DIR/network-objects
Expand Down
2 changes: 1 addition & 1 deletion scripts/init.sh
@@ -1,5 +1,5 @@
#!/bin/bash
ROOT_DIR=$(dirname "${0}")/..
ROOT_DIR=$1
USERS=3
CONVECTOR_DIR="${CONVECTOR_DIR:-$PWD/.convector-dev-env}"
CONVECTOR_CONFIG="${CONVECTOR_CONFIG:-$CONVECTOR_DIR/examples}"
Expand Down
10 changes: 5 additions & 5 deletions scripts/restart.sh
@@ -1,7 +1,7 @@
#!/bin/bash
ROOT_DIR='..'
ROOT_DIR=<%= path %>

<%= path %>/scripts/stop.sh
<%= path %>/scripts/clean.sh
<%= path %>/scripts/start.sh
<%= path %>/scripts/init.sh
$ROOT_DIR/scripts/stop.sh $ROOT_DIR
$ROOT_DIR/scripts/clean.sh $ROOT_DIR
$ROOT_DIR/scripts/start.sh $ROOT_DIR
$ROOT_DIR/scripts/init.sh $ROOT_DIR
2 changes: 1 addition & 1 deletion scripts/start.sh
@@ -1,5 +1,5 @@
#!/bin/bash
ROOT_DIR=$(dirname "${0}")/..
ROOT_DIR=$1

COMPOSE_PROJECT_NAME=net FABRIC_VERSION=x86_64-1.1.0 THIRDPARTY_VERSION=x86_64-0.4.6 \
docker-compose -f $ROOT_DIR/docker-compose.yml up -d
2 changes: 1 addition & 1 deletion scripts/stop.sh
@@ -1,5 +1,5 @@
#!/bin/bash
ROOT_DIR=$(dirname "${0}")/..
ROOT_DIR=$1

COMPOSE_PROJECT_NAME=net \
docker-compose -f $ROOT_DIR/docker-compose.yml down

0 comments on commit 0394ea8

Please sign in to comment.