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

Improve the release documentation #4333

Merged
merged 1 commit into from
Oct 26, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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