Skip to content
This repository has been archived by the owner on Dec 1, 2017. It is now read-only.

Commit

Permalink
Bug 1241649 - Hook up npm version to be able to bump the install.rd…
Browse files Browse the repository at this point in the history
…f.in and prepare for releases. r=Mardak
  • Loading branch information
Standard8 committed Jan 22, 2016
1 parent aa77fee commit 6054f48
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 1 deletion.
19 changes: 19 additions & 0 deletions Makefile
Expand Up @@ -54,6 +54,25 @@ BABEL := $(NODE_LOCAL_BIN)/babel
ESLINT := $(NODE_LOCAL_BIN)/eslint
FLAKE8 := $(NODE_LOCAL_BIN)/flake8

# In the PACKAGE_VERSION below we:
# - parse package.json
# - get the lines with version in
# - reduce to just the first of those lines
# - strip out space, " and ,
# - get the real version number (e.g. version:0.1.0 -> 0.1.0)
# - change 0.1.0-alpha to 0.1.0alpha for AMO compatiblity
PACKAGE_VERSION := $(shell grep -m1 version package.json | \
cut -d'"' -f4 | \
sed 's/-alpha/alpha/')

# Commands need to update the versions correctly in all places. Called from
# npm's version command as configured in package.json
.PHONY: update_version
update_version:
@sed -i '' \
-e 's/<em:version>.*<\/em:version>/<em:version>$(PACKAGE_VERSION)<\/em:version>/' \
$(ADD-ON)/install.rdf.in

$(VENV): bin/require.pip
virtualenv -p python2.7 $(VENV)
. $(VENV)/bin/activate && pip install -r bin/require.pip
Expand Down
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -26,3 +26,8 @@ Contributing

Please see the [Contributing](CONTRIBUTING.md) documentation before
submitting a pull request.

Other Documentation
===================

* [Release instructions](docs/Releases.md)
42 changes: 42 additions & 0 deletions docs/Releases.md
@@ -0,0 +1,42 @@
Releases
========

This is a description of how we create the various releases for Loop. You only
need to read it if you're doing a release, although it might be of interest for
others.

Bumping Version Number of `master`
----------------------------------

Whenever a release is made, we bump the version number of master. The version of
master should always finish with `-alpha`.

To bump the version number:

```shell
$ # Checkout and update master according to your standard practice.
$ # Then run this command, which will run tests and bump the version numbers:
$ npm --no-git-tag-version version <version>-alpha
$ # If successful, commit the result
$ git commit -m "Update master version following <version> release." -a
$ # Then push the result to the repo
```

Where `<version>` is the version of the add-on just released.

Note: We don't tag alpha versions on `master`, hence the `--no-git-tag-version`

Beta Releases of the Add-on
---------------------------

TBD

Exporting Releases to mozilla-central
-------------------------------------

TBD

Releasing the Standalone UI
---------------------------

TBD
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -52,7 +52,9 @@
},
"scripts": {
"test": "make test",
"start": "make runserver"
"start": "make runserver",
"preversion": "make test",
"version": "make update_version"
},
"license": "MPL-2.0"
}

0 comments on commit 6054f48

Please sign in to comment.