Skip to content

Commit

Permalink
Improve the release documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Oct 26, 2018
1 parent f1f3d2e commit 960fbac
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ before_install:
- /opt/google/chrome/chrome --version
- git config --global user.name "Travis"
- git config --global user.email "travis@travis-ci.org"
- buildtools/set-version

install:
- export GIT_BRANCH=${TRAVIS_BRANCH}
Expand Down
25 changes: 25 additions & 0 deletions buildtools/set-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import json
import os
import re

if len(os.environ.get("TRAVIS_TAG", "")) == 0:
exit(0)

with open("package.json") as package_json_file:
package_json = json.loads(package_json_file.read())

version = os.environ["TRAVIS_TAG"]
match_dev = re.match(r"([0-9]+\.[0-9]+\.[0-9]+)-([a-z]+)\.([0-9]+)", version)
if match_dev is None:
if package_json["version"] == version:
exit(0)
else:
exit(1)

package_json["version"] = version

with open("package.json", "w") as package_json_file:
package_json_file.write(json.dumps(package_json, sort_keys=True, indent=2))
24 changes: 23 additions & 1 deletion docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,34 @@ fdescribe('...', function() {
## Create a package on npm
Set the version in the `package.json` file.
Checkout the latest version
```
git checkout master
git fetch origin
git reset --hard origin/master
```
Create a tag named the same as the version.
```
git tag <version>
git push <version>
```
Travis will create a new package on npm.
If you create a new release, bump version in the package.json file:
```
git checkout -b bump
vi package.json
git add package.json
git commit -m "Bump version to 2.4.x+1"
git push origin bump
```
Do the pull request
## Create a new stabilisation branch
When we create a new stabilisation branch we should also duplicate the localisation.
Expand Down

0 comments on commit 960fbac

Please sign in to comment.