Skip to content

Commit

Permalink
add git submodule to npm install
Browse files Browse the repository at this point in the history
  • Loading branch information
mbwhite committed Feb 28, 2017
1 parent e493d44 commit 240110b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ pids
*.pid
*.seed

# License files
license-*.txt

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ You must run the following commands in order to pull the Hyperledger fabric chai

You should see messages indicating that the required git repositories have been cloned into the correct vendor subdirectory.

> The git submodule should not be required now, they have been added to the npm install step. When this has been confirmed as working well, this will be updated.
You must install [Lerna](https://lernajs.io) to build this multi-package repository:

$ npm install -g lerna
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"devDependencies": {
"colors": "^1.1.2",
"lerna": "2.0.0-beta.37",
"licensecheck": "^1.3.0",
"moment": "^2.17.1",
"semver": "^5.3.0",
"sleep-promise": "^2.0.0"
Expand All @@ -13,7 +14,7 @@
"private": true,
"scripts": {
"postinstall": "npm run pkgcheck && npm run bootstrap",
"bootstrap": "lerna bootstrap",
"bootstrap": "git submodule init && git submodule update && lerna bootstrap",
"test": "lerna run test",
"scanlicenses": "./scripts/scan-all-licenses.sh",
"pkgcheck": "node ./scripts/pkgcheck.js",
Expand Down
8 changes: 5 additions & 3 deletions scripts/scan-all-licenses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ set -e
# Grab the Concerto directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"

BIN=${DIR}/node_modules/.bin

echo "Scanning all the node modules starting at "${DIR}
echo "Needs to have had npm install -g npm -g install licensecheck"
#echo "Needs to have had npm install -g npm -g install licensecheck"

rm -f "${DIR}/license-raw.txt"
touch "${DIR}/license-raw.txt"
Expand All @@ -19,8 +21,8 @@ touch "${DIR}/license-full.txt"
ls -d "${DIR}"/packages/* | while read dirname
do
cd "${dirname}"
licensecheck --tsv >> "${DIR}/license-raw.txt"
licensecheck >> "${DIR}/license-full.txt"
${BIN}/licensecheck --tsv >> "${DIR}/license-raw.txt"
${BIN}/licensecheck >> "${DIR}/license-full.txt"
echo "-------------------------------------------" >> "${DIR}/license-full.txt"

done
Expand Down

0 comments on commit 240110b

Please sign in to comment.