Monorepo initialization (#101)
* Update postinstall script * Add initialize script, simplify readme * Unsafe perm * Added initialize-root job * Initialize-root only on master
This commit is contained in:
parent
81a936af45
commit
3be812d55f
@ -35,6 +35,12 @@ jobs:
|
||||
key: initialize-{{ .Environment.CIRCLE_SHA1 }}
|
||||
paths:
|
||||
- ~/project
|
||||
initialize-root:
|
||||
docker:
|
||||
- image: circleci/node:10.15
|
||||
steps:
|
||||
- checkout
|
||||
- run: sudo su - -c 'export CI=true && cd /home/circleci/project && yarn initialize && yarn test'
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/node:10.15
|
||||
@ -111,6 +117,10 @@ workflows:
|
||||
tokenbridge:
|
||||
jobs:
|
||||
- initialize
|
||||
- initialize-root:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
- build:
|
||||
requires:
|
||||
- initialize
|
||||
|
24
README.md
24
README.md
@ -47,26 +47,14 @@ The POA TokenBridge provides three operational modes:
|
||||
|
||||
## Initializing the monorepository
|
||||
|
||||
Clone the repository with submodules:
|
||||
Clone the repository:
|
||||
```bash
|
||||
git clone --recursive https://github.com/poanetwork/tokenbridge
|
||||
|
||||
# or initialize submodules if already cloned without --recursive option:
|
||||
git submodule update --init
|
||||
git clone https://github.com/poanetwork/tokenbridge
|
||||
```
|
||||
|
||||
Install dependencies:
|
||||
|
||||
Initialize submodules, install dependencies, compile the Smart Contracts:
|
||||
```
|
||||
yarn install && yarn install:deploy
|
||||
```
|
||||
|
||||
_**Note**: The installation should be performed with an unprivileged Linux account or with the following flag: `yarn install --unsafe-perm`. [More information](https://docs.npmjs.com/misc/scripts#user)_
|
||||
|
||||
Compile the Smart Contracts
|
||||
|
||||
```
|
||||
yarn compile:contracts
|
||||
yarn initialize
|
||||
```
|
||||
|
||||
## Linting
|
||||
@ -97,6 +85,10 @@ Additionaly there are end-to-end tests for [Oracle](oracle-e2e/README.md) and [U
|
||||
|
||||
For details on building, running and developing please refer to respective READMEs in sub-repositories.
|
||||
|
||||
## Building, running and deploying
|
||||
|
||||
Please refer to the instructions in sub-directories.
|
||||
|
||||
## Contributing
|
||||
|
||||
See the [CONTRIBUTING](CONTRIBUTING.md) document for contribution, testing and pull request protocol.
|
||||
|
@ -31,6 +31,7 @@
|
||||
"contracts"
|
||||
],
|
||||
"scripts": {
|
||||
"initialize": "yarn clean && git submodule update --init && yarn install --unsafe-perm --frozen-lockfile && yarn install:deploy && yarn compile:contracts",
|
||||
"build": "yarn workspace ui run build",
|
||||
"lint": "yarn wsrun --exclude oracle-e2e --exclude ui-e2e --exclude poa-parity-bridge-contracts lint",
|
||||
"test": "yarn wsrun --exclude monitor --exclude oracle-e2e --exclude ui-e2e test",
|
||||
@ -39,7 +40,7 @@
|
||||
"ui-e2e": "./ui-e2e/run-tests.sh",
|
||||
"clean": "rm -rf ./node_modules ./**/node_modules ./**/**/node_modules ./**/build",
|
||||
"compile:contracts": "yarn workspace poa-parity-bridge-contracts run compile",
|
||||
"install:deploy": "cd contracts/deploy && npm install --silent",
|
||||
"install:deploy": "cd contracts/deploy && npm install --unsafe-perm --silent",
|
||||
"postinstall": "ln -sf $(pwd)/node_modules/openzeppelin-solidity/ contracts/node_modules/openzeppelin-solidity"
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@
|
||||
"coverage": "react-app-rewired test --env=jsdom --coverage",
|
||||
"coveralls": "cat ./coverage/lcov.info | node node_modules/.bin/coveralls",
|
||||
"eject": "react-app-rewired eject",
|
||||
"postinstall": "(cp lib/web3-eth/index.js ../node_modules/web3-eth/src && cp lib/web3-eth/index.js ./node_modules/web3-eth/src)"
|
||||
"postinstall": "(cp lib/web3-eth/index.js ../node_modules/web3-eth/src; cp lib/web3-eth/index.js ./node_modules/web3-eth/src) || :"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-eslint": "^10.0.1",
|
||||
|
Loading…
Reference in New Issue
Block a user