Skip to content

Commit

Permalink
Add automatic CI versioning (#64)
Browse files Browse the repository at this point in the history
Updates travis.yml to use frauci-update-version to bump package.json version and tag commit on each commit/pr merge to master. Use travis releases provider to create a new github release matching tag.
  • Loading branch information
mdgbayly committed Apr 2, 2019
1 parent a5a02a4 commit 4c0d8c2
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,21 @@ script:
echo "Not a pull request and/or no secure environment variables, running headless tests...";
npm run test:polymer:local || travis_terminate 1;
fi
- |
if [ "$TRAVIS_BRANCH" == "master" ] && [ $TRAVIS_PULL_REQUEST == false ]; then
echo "Not a Pull Request and on branch master so bumping version";
frauci-update-version;
export TRAVIS_TAG=$(frauci-get-version)
fi
deploy:
provider: releases
api_key: "$GITHUB_RELEASE_TOKEN"
on:
tags: true
env:
global:
- OWNER_NAME=BrightspaceUI
- REPO_NAME=file-uploader
- SAUCE_USERNAME: Desire2Learn
- secure: dSqGOEPNGxnA3o9eZubz8XaFM/JaxBm7U+FIIgSspSHAUxmdDS9oEuwv8cWQsTkP7+Gv50n//tAoWpD9mjbvs2gfwiDJG4ulA/JHms7+WBt0GP+/LunC1s2QJmQXAbO11amB/n+qU7CrvLgpXFyWPeD5wekEpOWXbLnh29txtjrjbJMiT+1q9j1leeu0pQF45voW+bBZyWUULB0Yd0FyOBgps2SPc1pUyYWDyCX5BjZ81qh0+p9R68pQpoXtz90IVfzsJrZYnB/FNSZx6vuJYeBB0VPJXIuJiMjTWof1MccUHasopikA1zS2RB0P5GY+PGuhUdRbocqv2iFLyg+0sdQkHjoHoD0GzUzlFA9royyOk+76l6AWF5BYlaT80cw7jcROIksD7W5uiXj4swpahEeiA7Tnin7KcyPTCWAMAUc7jis/ACGyycgUl1dQ6Kyhid35raZ1hdVQmKrVlWQfXGBGlMjXEuxgvTOVX6EHyNqLTfA1dd7gNeIOkYJZO/SDlahPHgzjC6K5FB5I5gbHZKoDZySFf0qBW1OL6nOR5FsHi5ZaqnPBWoo8ZopX5qlL+UqquJfUM3icIwwUT9R4KTCvDCmXfdoicFRjvikZDLvhSgBScgFdab/g4ZbLCtqo2o4pJ28t5Lb/7olOKCscxYF9RxNXpHc5K0hZjHq7pWU=
- secure: JGGYU1tQS56VBOIF21rOgGApFiqYr9fI1L9hjW7kV6viLTQH4EeCT6fxRd3NgvGegM1+7dspKZkeOG9VVpXzoBjVdnkhjzhWcAs/V76K0kmgP7gFtMxy6xm6S8EpX1lecpjGE5mIBnssGDCj3Cu8tPoOyUL1beKe0rZfh9HTGoFHJTpGpOOg2mxrpc9c1y1i4P01Z45Bi3SZirC4ryVECimOGDK/wDjrMhi8Dbkdmn9Lj3rw65xt2Rw5lC1/kAJ5VtCNRW3HVlrPWKqqjyy1S9PrpESU1BFEkGgfMsLjKbxuk2XaTqFrOJUoxD8XqnhpvPUdgh6gLwIA/AeZJbxwDwB79M6CZHcpF6lZze9T3fw+wSITnHH0uKrelM50KDPwAPvUna5mU50Y1J7RvvdyIc7QFhnrVrKl3XDCyK4L2LsHaRo2+Ye5vSZGSac70l6O+WXNluIVmWRNB832MxVKtgXrRqARiFIsMieOkCAm3jCXaUnPD8K4vdumT+c9UH/c1O6yuL4chHPnZexAOF5tdDdnUnS1yLMLICTRs7+PHrtJYmOqxjAkwM4o+Lktq6eVxGi1OAvI5OH6HAhnnrZDz0GUiek4BC9j1yTsHxFUyKPrOQ0rcHFQmC57miNjAaacFfJlL+X6zb7det0u6L6nf1/K33vu07bWXx/hq1KVm7I=
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,12 @@ npm test
[bower-image]: https://badge.fury.io/bo/d2l-file-uploader.svg
[ci-url]: https://travis-ci.org/BrightspaceUI/file-uploader
[ci-image]: https://travis-ci.org/BrightspaceUI/file-uploader.svg

## Versioning

Commits and PR merges to master will automatically do a minor version bump which will:
* Update the version in `package.json`
* Add a tag matching the new version
* Create a github release matching the new version

By using either **[increment major]** or **[increment patch]** notation inside your merge message, you can overwrite the default version upgrade of minor to the position of your choice.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
"eslint": "^4.15.0",
"eslint-config-brightspace": "^0.4.0",
"eslint-plugin-html": "^4.0.1",
"frau-ci": "^1.33.2",
"polymer-cli": "^1.9.2",
"wct-browser-legacy": "^1.0.1"
},
"version": "",
"version": "1.5.4",
"resolutions": {
"inherits": "2.0.3",
"samsam": "1.1.3",
Expand Down

0 comments on commit 4c0d8c2

Please sign in to comment.