feat: partial integrate of release changes
This commit is contained in:
parent
d31e0a88f8
commit
2d03dc5dad
3 changed files with 62 additions and 39 deletions
81
.travis.yml
81
.travis.yml
|
|
@ -10,10 +10,10 @@ cache:
|
||||||
directories:
|
directories:
|
||||||
- node_modules
|
- node_modules
|
||||||
|
|
||||||
# Custom install step so the travis scripts don't need to be in package.json
|
# Custom install step so the travis-only stuff doesn't need to be in package.json
|
||||||
install:
|
install:
|
||||||
- npm install
|
- npm install
|
||||||
- npm install @alrra/travis-scripts@^3.0.1
|
- npm install @alrra/travis-scripts@^3.0.1 gh-pages@^0.12.0
|
||||||
|
|
||||||
# Bundle before running tests so the bundle is always up-to-date
|
# Bundle before running tests so the bundle is always up-to-date
|
||||||
before_script: npm run build
|
before_script: npm run build
|
||||||
|
|
@ -21,48 +21,67 @@ before_script: npm run build
|
||||||
# This is the default, but leaving so it is obvious
|
# This is the default, but leaving so it is obvious
|
||||||
# script: npm test
|
# script: npm test
|
||||||
|
|
||||||
# After a successful build create bundles & commit back to the repo
|
# After a successful build commit changes back to repo
|
||||||
after_success:
|
after_success:
|
||||||
- |
|
- |
|
||||||
|
# Set up SSH environment
|
||||||
|
$(npm bin)/set-up-ssh \
|
||||||
|
--key "$encrypted_8b86e0359d64_key" \
|
||||||
|
--iv "$encrypted_8b86e0359d64_iv" \
|
||||||
|
--path-encrypted-key "./.deploy.enc"
|
||||||
|
|
||||||
|
# Commit bundle changes generated in before_script step
|
||||||
|
# --commands is a weird no-op but required for commit-changes to run
|
||||||
|
# --branch arg is to ensure this only runs against the `next` branch
|
||||||
|
$(npm bin)/commit-changes \
|
||||||
|
--commands "echo committing" \
|
||||||
|
--commit-message "Bundled output for commit $TRAVIS_COMMIT [skip ci]" \
|
||||||
|
--branch "next"
|
||||||
|
|
||||||
# Only want to commit when building a push on whatever $BRANCH is
|
# Only want to commit docs when building pushes on master &
|
||||||
|
# this doesn't have the built-in branch protection like commit-changes
|
||||||
if [ "$TRAVIS_EVENT_TYPE" == "push" ] && \
|
if [ "$TRAVIS_EVENT_TYPE" == "push" ] && \
|
||||||
[ "$TRAVIS_BRANCH" == "$BRANCH" ] && \
|
[ "$TRAVIS_BRANCH" == "master" ] && \
|
||||||
[ "$TRAVIS_REPO_SLUG" == "$REPO" ]
|
[ "$TRAVIS_REPO_SLUG" == "lhorie/mithril.js" ]
|
||||||
then
|
then
|
||||||
# Set up SSH environment
|
# Generate docs
|
||||||
$(npm bin)/set-up-ssh \
|
$(npm-bin) run gendocs
|
||||||
--key "$encrypted_8b86e0359d64_key" \
|
|
||||||
--iv "$encrypted_8b86e0359d64_iv" \
|
|
||||||
--path-encrypted-key "./.deploy.enc"
|
|
||||||
|
|
||||||
# Commit changes (if there were any) from running build earlier
|
# Commit docs to gh-pages branch
|
||||||
$(npm bin)/commit-changes \
|
# Using --add to ensure that archived versions aren't lost
|
||||||
--commands "echo committing" \
|
# Using --repo to force it to go over SSH so the saved keys are used (tschaub/gh-pages#160)
|
||||||
--commit-message "Bundled output for commit $TRAVIS_COMMIT [skip ci]" \
|
$(npm bin)/gh-pages --dist ./dist --add --repo "git@github.com:lhorie/mithril.js.git"
|
||||||
--branch "$BRANCH"
|
|
||||||
else
|
else
|
||||||
echo "Not submitting build artifacts"
|
echo "Not submitting documentation updates"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Environment configuration
|
# Environment configuration
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
# Restrict the branch this will activate on
|
|
||||||
- BRANCH=rewrite
|
|
||||||
- REPO=lhorie/mithril.js
|
|
||||||
|
|
||||||
# Set up GH_USER_EMAIL & GH_USER_NAME env variables used by travis-scripts package
|
# Set up GH_USER_EMAIL & GH_USER_NAME env variables used by travis-scripts package
|
||||||
- secure: Xvqvm3+PvJu/rs3jl/NNn0RWLkkLkIoPHiL0GCfVRaywgjCYVN02g54NVvIDaOfybqPmu9E6PJFVs92vhF34NMFQHf4EWskynusIGV271R2BV0i+OJBfLMuLgiwm6zRn7/Zw4JvWIUGEwcnlz0qxbqdHsS0SOR3fIkFzePickW0=
|
- secure: Xvqvm3+PvJu/rs3jl/NNn0RWLkkLkIoPHiL0GCfVRaywgjCYVN02g54NVvIDaOfybqPmu9E6PJFVs92vhF34NMFQHf4EWskynusIGV271R2BV0i+OJBfLMuLgiwm6zRn7/Zw4JvWIUGEwcnlz0qxbqdHsS0SOR3fIkFzePickW0=
|
||||||
- secure: Rf/ldEO9d4vItJhe6EmqWpFAyCARzoCb422nHnjr1hYJknnwIXpgyZ1C/7On/9o7rWPPf+8WcHC/rgjK2rthKCldzdG5I60LfWSNzap9lk3Aa4TpSCoDBuEp7JVvDr5tc3rKnBXVT71hOay7RSx1StWzXiJs9mjaeVMJzYzRT78=
|
- secure: Rf/ldEO9d4vItJhe6EmqWpFAyCARzoCb422nHnjr1hYJknnwIXpgyZ1C/7On/9o7rWPPf+8WcHC/rgjK2rthKCldzdG5I60LfWSNzap9lk3Aa4TpSCoDBuEp7JVvDr5tc3rKnBXVT71hOay7RSx1StWzXiJs9mjaeVMJzYzRT78=
|
||||||
|
|
||||||
# Deploy to npm on tagged commits that successfully build
|
# Deploy to npm and github pages on tagged commits that successfully build
|
||||||
deploy:
|
deploy:
|
||||||
provider: npm
|
- provider: releases
|
||||||
email: npm@patcavit.com
|
api_key:
|
||||||
skip_cleanup: true
|
secure: PauFuz+pn7oRpHn2JTl4k3+iWjOofyBYBvavPQVNdXgKws9mGj0i2n5k2oIDU09VD7NeyEkwP6tdLCUFNaR8uwTJH/TBXMZE95oxUEaliFreA0nOiI3WkG4NCW0GwUoIIn1yL14y6+9oEBinWUia8DIn9kZNS11DNDgQpIPnoQQ=
|
||||||
api_key:
|
file:
|
||||||
secure: ADElvD1oxn9GfEG7dDOggX96b36A/cGEybovAc0221CCKzv5kWCavMrtxneiJYI6N/n24abSlbM90vMfU84FEzH0Ev28dGVokRP4ad6VRkISszKlYVEP8Lds4QxfKh78jZlUxmxM0B3vmQ1kYJbTBqp3ICtaJ5ptEQHWhrLtxnc=
|
- "mithril.js"
|
||||||
on:
|
- "mithril.min.js"
|
||||||
tags: true
|
skip_cleanup: true
|
||||||
repo: lhorie/mithril.js
|
on:
|
||||||
|
tags: true
|
||||||
|
repo: lhorie/mithril.js
|
||||||
|
branch: master
|
||||||
|
|
||||||
|
- provider: npm
|
||||||
|
skip_cleanup: true
|
||||||
|
email: npm@patcavit.com
|
||||||
|
api_key:
|
||||||
|
secure: ADElvD1oxn9GfEG7dDOggX96b36A/cGEybovAc0221CCKzv5kWCavMrtxneiJYI6N/n24abSlbM90vMfU84FEzH0Ev28dGVokRP4ad6VRkISszKlYVEP8Lds4QxfKh78jZlUxmxM0B3vmQ1kYJbTBqp3ICtaJ5ptEQHWhrLtxnc=
|
||||||
|
on:
|
||||||
|
tags: true
|
||||||
|
repo: lhorie/mithril.js
|
||||||
|
branch: master
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,14 @@ Releasing new builds of mithril is mostly automated via `npm version`
|
||||||
|
|
||||||
## Publishing to NPM
|
## Publishing to NPM
|
||||||
|
|
||||||
1. `npm version <major|minor|patch|semver> -m "v%s"`
|
1. `npm run release <major|minor|patch|semver>`
|
||||||
|
|
||||||
All further steps are automated and run as follows:
|
All further steps are automated and run as follows:
|
||||||
|
|
||||||
2. Tests are run
|
2. New bundles are generated using updated version
|
||||||
3. Linting is run (but doesn't fail build)
|
3. Tests are run
|
||||||
4. Version number in package.json is incremented
|
4. Linting is run (but doesn't fail build)
|
||||||
5. New bundles are generated using updated version
|
5. Version number in package.json is incremented
|
||||||
6. `git add` called on bundle output
|
6. `git add` called on bundle output
|
||||||
7. `package.json` and updated bundles are committed to git
|
7. `package.json` and updated bundles are committed to git
|
||||||
8. previous commit is tagged using new version number
|
8. previous commit is tagged using new version number
|
||||||
|
|
@ -27,7 +27,9 @@ All further steps are automated and run as follows:
|
||||||
|
|
||||||
## Publishing a GitHub release
|
## Publishing a GitHub release
|
||||||
|
|
||||||
**TODO**
|
Happens automatically as part of the [Publishing to NPM](#publishing-to-npm) process described above.
|
||||||
|
|
||||||
|
Does require a manual description to be added though, as the auto-generated one isn't very interesting.
|
||||||
|
|
||||||
## Updating `docs/change-log.md`
|
## Updating `docs/change-log.md`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "mithril",
|
"name": "mithril",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "A framework for building brilliant applications",
|
"description": "A framework for building brilliant applications",
|
||||||
"author": "Leo Horie",
|
"author": "Leo Horie",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
@ -14,11 +14,13 @@
|
||||||
"lintdocs": "node docs/lint",
|
"lintdocs": "node docs/lint",
|
||||||
"gendocs": "node docs/generate",
|
"gendocs": "node docs/generate",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
|
"lint:fix": "eslint . --fix",
|
||||||
"test": "node ospec/bin/ospec",
|
"test": "node ospec/bin/ospec",
|
||||||
"posttest": "npm run lint || true",
|
"posttest": "npm run lint || true",
|
||||||
"cover": "istanbul cover --print both ospec/bin/ospec",
|
"cover": "istanbul cover --print both ospec/bin/ospec",
|
||||||
|
"release": "npm version -m 'v%s'",
|
||||||
"preversion": "npm run test",
|
"preversion": "npm run test",
|
||||||
"version": "npm run build && npm run gendocs && git add mithril.js mithril.min.js",
|
"version": "npm run build && git add mithril.js mithril.min.js",
|
||||||
"postversion": "git push --follow-tags"
|
"postversion": "git push --follow-tags"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue