Skip to content

Commit

Permalink
chore(deploy) Setup deploy script for lerna
Browse files Browse the repository at this point in the history
Signed-off-by: Jerome Simeon <jeromesimeon@me.com>
  • Loading branch information
jeromesimeon committed Sep 12, 2019
1 parent 71e8196 commit 9baf08a
Show file tree
Hide file tree
Showing 18 changed files with 1,246 additions and 112 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,4 @@ typings/
userdata.json

# build output
lib
umd
23 changes: 12 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- '8'
- '8'
dist: trusty
before_install: |
set -e
Expand All @@ -10,19 +10,20 @@ before_install: |
install: |
set -e
date
npm install
npm install -g lerna@^3.15.0
lerna bootstrap 2>&1
date
script: npm run build && npm run test 2>&1
script: npm run test 2>&1
deploy:
provider: script
script:
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./.travis/deploy.sh; fi
skip_cleanup: true
on:
all_branches: true
repo: accordproject/markdown-transform
provider: script
script:
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./.travis/deploy.sh; fi'
skip_cleanup: true
on:
all_branches: true
repo: accordproject/markdown-transform
after_failure: tail -n +1 -- /home/travis/.npm/_logs/*-debug.log
after_success:
after_success:
cache:
directories:
- node_modules
Expand Down
2 changes: 1 addition & 1 deletion .travis/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export VERSION=$(node -e "console.log(require('${DIR}/package.json').version)")

# Publish with tag
echo "Pushing with tag ${TAG}"
npm publish --tag="${TAG}" 2>&1
lerna exec -- npm publish --tag="${TAG}" 2>&1

# Check that all required modules have been published to npm and are retrievable
for j in ${NPM_MODULES}; do
Expand Down
4 changes: 2 additions & 2 deletions .travis/stable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ echo "NPM_TOKEN " ${NPM_TOKEN}
npm config set registry https://registry.npmjs.org/
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}

npm publish --tag="${NPM_TAG}" 2>&1
echo "Published to npm."
lerna publish --yes --conventional-commits -m "chore(release): publish %s" --force-publish=*
echo "Published to npm using lerna."
4 changes: 2 additions & 2 deletions .travis/unstable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ echo "NPM_TOKEN " ${NPM_TOKEN}
npm config set registry https://registry.npmjs.org/
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}

npm publish --tag="${NPM_TAG}" 2>&1
echo "Published to npm."
lerna publish --yes --canary --conventional-commits -m "chore(release): publish %s"
echo "Published to npm using lerna."
File renamed without changes.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lerna": "2.11.0",
"lerna": "3.15.0",
"packages": [
"packages/*"
],
Expand Down
Loading

0 comments on commit 9baf08a

Please sign in to comment.