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

build(ci release): enable releasing via travis #15

Merged
merged 1 commit into from
Mar 15, 2019
Merged
Show file tree
Hide file tree
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
13 changes: 12 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,15 @@ node_js:
- node
addons:
chrome: stable
script: npm run all
script: npm run all

jobs:
include:
- stage: release
script: "npm run build && npm run lerna:publish"

# Conditional stages: https://docs.travis-ci.com/user/conditional-builds-stages-jobs/
stages:
- test
- name: release
if: branch = master AND fork = false AND tag IS present
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,31 @@

Welcome to the mutation testing elements mono repo.

It is a [lernajs](https://lernajs.io/) monorepository. Please see the [packages](https://github.com/stryker-mutator/mutation-testing-elements/tree/master/packages)
It is a [lernajs](https://lernajs.io/) mono repository. Please see the [packages](https://github.com/stryker-mutator/mutation-testing-elements/tree/master/packages)
directory to navigate to a sub package.

## Versioning

The `mutation-testing-report-schema` and `mutation-testing-elements` versions will be kept in sync.

The schema wil only have major and minor releases, as patch releases don't make sense. Backward compatible changes mean a minor version update, breaking changes will mean a major release.

The mutation-testing-elements major and minor version will be in sync with the schema, however it _can have_ patch releases for changes of the elements without a schema update.

Note that this is not strict semver 2.0.0. See https://github.com/stryker-mutator/mutation-testing-elements/issues/5 for the reasoning behind it.

An example (just for clarification, versions are not based on reality):

| Schema version | Supported mutation-testing-elements implementations |
| ------------- | ------------- |
| `1.0` | `1.0.0`, `1.0.1` |
| `1.1` | `1.0.0`, `1.0.1`, `1.1.0`, `1.1.1` |
| `2.0` | `2.0.0`, `2.0.1` |

## Releasing

Releasing is done with from the travis build server. Perform the following steps:

* Clone the repo and run `npm install`.
* Run `npm run lerna:version:patch`, `npm run lerna:version:minor` or `npm run lerna:version:major` (based on the release you want). Lerna will figure out which packages need to be released and prompt if it is OK.
* After the new tag is pushed to the master branch, it should be released via travis.
9 changes: 7 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
"packages": [
"packages/*"
],
"version": "1.0.0"
}
"version": "1.0.0",
"command": {
"version": {
"allowBranch": "master"
}
}
}
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
"build": "tsc -b && lerna run build",
"test": "lerna run test --stream",
"start": "webpack-dev-server --open",
"start:tsc": "tsc --build --watch"
"start:tsc": "tsc --build --watch",
"lerna:version:patch": "lerna version --conventional-commits patch",
"lerna:version:minor": "lerna version --conventional-commits minor",
"lerna:version:major": "lerna version --conventional-commits major",
"lerna:publish": "lerna publish from-git"
},
"repository": {
"type": "git",
Expand Down