Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add survey #5

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -4,14 +4,16 @@
"description": "Generate Aragon local dev environment snapshots",
"main": "index.js",
"scripts": {
"prepublishOnly": "npm run start",
"start": "npm run start-ganache-bg && npm run gen",
"gen": "npm run get-repos && scripts/deploy-base && scripts/deploy-beta",
"prepublishOnly": "npm run gen",
"postinstall": "npm run gen",
"start": "npm run start:beta",
"start:beta": "npm run start-ganache-bg && npm run deploy:beta",
"start:survey": "npm run start-ganache-bg && npm run deploy:survey",
"gen": "scripts/get-repos",
"deploy:beta": "scripts/deploy-base && scripts/deploy-beta",
"deploy:survey": "scripts/deploy-base && scripts/deploy-survey",
"start-ganache": "scripts/start-ganache",
"start-ganache-bg": "scripts/start-ganache-bg",
"get-repos": "scripts/get-repos",
"deploy-base": "scripts/deploy-base",
"deploy-beta": "scripts/deploy-beta"
"start-ganache-bg": "scripts/start-ganache-bg"
},
"files": [
"index.js",
4 changes: 2 additions & 2 deletions scripts/deploy-beta
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
set -e;
source scripts/set-env;

cd repos/aragon-apps/templates/beta;
cd repos/dao-kits/kits/beta;
npx truffle migrate --reset --network rpc

echo "Beta templates deployed and packages created in APM"
echo "Beta kit deployed and packages created in APM"
1 change: 1 addition & 0 deletions scripts/deploy-survey
Original file line number Diff line number Diff line change
@@ -6,3 +6,4 @@ source scripts/set-env;
cd repos/dao-kits/kits/survey;
npx truffle migrate --reset --network rpc

echo "Survey kit deployed and packages created in APM"
10 changes: 5 additions & 5 deletions scripts/get-repos
Original file line number Diff line number Diff line change
@@ -7,18 +7,18 @@ mkdir repos;
cd repos;

echo "Fetching aragonOS and installing dependencies..."
git clone https://github.com/aragon/aragonOS.git -b v3.1.4;
git clone git@github.com:aragon/aragonOS -b v3.1.8;
cd aragonOS;
npm i;
cd ..;

echo "Fetching aragon-id and installing dependencies..."
git clone https://github.com/aragon/aragon-id.git -b master;
git clone git@github.com:aragon/aragon-id -b master;
cd aragon-id;
npm i;
cd ..;

echo "Fetching aragon-apps and installing dependencies (this may take a while 😉)"
git clone https://github.com/aragon/aragon-apps.git -b master;
cd aragon-apps;
echo "Fetching dao-kits and installing dependencies (this may take a while 😉)"
git clone git@github.com:aragon/dao-kits.git -b master;
cd dao-kits;
npm i;
17 changes: 12 additions & 5 deletions scripts/start-ganache-bg
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#!/bin/bash

set +e;
kill -9 $(lsof -t -i:8545);
set -e;
ganache_port=8545
ganache_running() {
nc -z localhost "$ganache_port" &> /dev/null
}

echo \"Starting ganache in the background\n\n\";
nohup npm run start-ganache &
if ganache_running; then
echo "Killing ganache instance at port $ganache_port"
kill -9 $(lsof -t -i:$ganache_port);
fi

printf "Starting ganache in the background\n\n";

nohup npm run start-ganache &