Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Commit 77455cd

Browse files
committed
Merge pull request #437 from thaliproject/issue_425
Update release instructions.
2 parents 8f4f884 + 2ff3a0e commit 77455cd

File tree

1 file changed

+36
-19
lines changed

1 file changed

+36
-19
lines changed

TeamReadMe.md

Lines changed: 36 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,51 @@ For all of this to work we have to have files in at least four different places:
2828
* __BinTray__ - We have our own bintray available [here](https://bintray.com/thali/Thali) where we publish the btconnectorlib2 JAR for Android
2929

3030
## Managing a new release
31+
32+
The release preparations start from updating the dependency in the thali NPM package. This is needed
33+
so that the NPM package installations picks up the matching version of the Thali Cordova plugin.
34+
35+
The file at `thali/install/install.js` has a variable `thaliBranchName` inside the function it exports.
36+
The value must be matching to the release you are about to make, for example, `npmv2.0.4`.
37+
38+
There are different levels that the version can be bumped to.
39+
Please read the [version](https://docs.npmjs.com/cli/version) docs to understand the choices and make sure
40+
you read up on [semver](http://semver.org/).
41+
42+
The right version must also be updated to `thali/package.json`, for example, `2.0.4`.
43+
44+
After the versions are updated, the release should be tagged in git. This can be done with something like
45+
`git tag npmv2.0.4`.
46+
47+
Then, the changes done should be pushed to git and in addition, the new tag needs to be pushed as well with
48+
`git push --tags`.
49+
50+
Next step is to create a release in GitHub:
51+
1. Go to the releases tab on the front page of the project on GitHub
52+
2. Hit 'Draft a new release'
53+
3. In 'Tag version' enter the right tag, for a NPM release this will be the NPM tag that was generated above and should already be in the tag list on GitHub. For example, `npmv2.0.4`. If you got the tag right, then GitHub will say 'Existing Tag'.
54+
4. Enter a release title, typically this is something like "Story X - Y"
55+
5. Enter a description that briefly specifies what functionality or bug fixes were added
56+
6. For now make sure to check "This is a pre-release"
57+
7. Hit publish release!
58+
59+
Now there is the right version of the Cordova plugin in the location from which the NPM package installation
60+
can pick it up.
61+
3162
### Updating NPM
32-
In preparation for a new release we have to publish a new version to NPM. Strictly speaking this is only necessary
33-
if we changed any of the .js files but realistically all of our stories require that so just assume it.
3463

3564
1. Navigate to the thali sub-directory
3665
2. Run `git status` and make sure it is clean
37-
3. Run `npm version patch -m "Upgrade to %s because of..."`
38-
1. Note the word 'patch'. There are different levels that the version can be bumped to. Please read the [version](https://docs.npmjs.com/cli/version) docs to understand the choices and make sure you read up on [semver](http://semver.org/). This command will bump the version in the package.json and create a GIT update tagged with that version.
39-
2. On my Mac the npm version command does not work properly. It will upgrade the package.json but that is it. It won't do the GIT commit or the GIT tag. So once I run npm version I still have to do the commit and tagging myself. I first issued `git tag -a npmv1.0.21 -m "Thali NPM Version 1.0.21"` and then I issued `git push --tags`
40-
4. Run `npm publish`
66+
3. Run `npm publish`
4167

42-
Also keep in mind that thali/install/install.js has a variable called 'thaliBranchName" that points to the branch
43-
where we will download the cordova code from. Right now that branch points at story_0 but soon enough we will
44-
change it to point at master. For most folks it's o.k. to leave this because when we dev on a local branch we tend
45-
to get our files locally, not from NPM. But it's good to be aware of this variable's existence.
68+
If you want to verify the release package before publishing it, you can use `npm pack` to create a tgz file.
69+
Then, you can point `jx npm install` into this tgz to install the package locally and make sure the installation
70+
works properly and the matching version of the Thali Cordova plugin got installed.
4671

4772
### The rest of the process
4873
1. Write up a blog article for Thali's blog (this will be auto-reposted to Twitter)
4974
2. Go to [stories](https://github.com/thaliproject/thali/blob/gh-pages/stories.md) and mark the story as completed. This requires both marking it completed in the table of contents and then use `~~` wrappers to strike out the entry in the body.
50-
3. Go to GitHub and create a release
51-
1. Go to the releases tab on the front page of the project on GitHub
52-
2. Hit 'Draft a new release'
53-
3. In 'Tag version' enter the right tag, for a NPM release this will be the NPM tag that was generated above and should already be in the tag list on GitHub. For example, 'npmv1.0.22'. If you got the tag right then GitHub will say 'Existing Tag'.
54-
4. Enter a release title, typically this is something like "Story X - Y"
55-
5. Enter a description that briefly specifies what functionality or bug fixes were added
56-
6. For now make sure to check "This is a pre-release"
57-
7. Hit publish release!
58-
4. Go to internal metrics spreadsheet and add the release to both the shared code and blog tabs.
75+
3. Go to internal metrics spreadsheet and add the release to both the shared code and blog tabs.
5976

6077
## Want to develop locally?
6178

0 commit comments

Comments
 (0)