Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit a9b4ffd

Browse files
committed
release.js: add usage documentation
1 parent 8f9be90 commit a9b4ffd

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

release.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
/**
2+
* This file can be used to generate automatically new releases of the source code.
3+
* It can either generate major/minor releases based on development branch or hotfix releases based on master branch.
4+
*
5+
* Usage and process to generate a new major/minor release:
6+
* 1 - Ensure your working copy is clear and that eveything has been pushed/pulled into/from origin/remote repository
7+
* 2 - Start a new git flow by using this script:
8+
* # node release.js --start [--type major|minor] [--version <version>]
9+
* If version is not provided, the version number will be automatically updated according to release type.
10+
* This script will:
11+
* a - start a new release git flow (create a release branch from development branch)
12+
* b - update the package.json file with the new release version number
13+
* c - modify the RELEASES_NOTES.txt file by inserting a new section for the release and appending all commits messages
14+
* 3 - Modify the RELEASES_NOTES.txt file to format and finalize the release notes
15+
* 4 - Commit and push the RELEASES_NOTES.txt file
16+
* 5 - Once the release branch tested/validated and ready to be merged, finish the git flow by executing the script:
17+
* # node release.js --finish
18+
* This script will:
19+
* a - Finish the release git flow (merge release branch into master branch and add a tag)
20+
* b - Modify the package.json file on development branch to setup next version number (in development phase, with suffix '-dev')
21+
*
22+
* Usage and process to generate a new hotfix release:
23+
* 1 - Ensure your working copy is clear and that eveything has been pushed/pulled into/from origin/remote repository
24+
* 2 - Start a new git flow by using this script:
25+
* # node release.js --start [--type patch] [--version <version>]
26+
* If version is not provided, the version number will be automatically updated according to release type.
27+
* This script will:
28+
* a - start a new release git flow (create a hotfix branch from master branch)
29+
* b - update the package.json file with the new release version number
30+
* c - modify the RELEASES_NOTES.txt file by inserting a new section for the release and appending all commits messages
31+
* 3 - Modify the RELEASES_NOTES.txt file to format and finalize the release notes
32+
* 4 - Commit and push the RELEASES_NOTES.txt file
33+
* 5 - Once the release branch tested/validated and ready to be merged, finish the git flow by executing the script:
34+
* # node release.js --finish
35+
* This script will finish the release git flow (merge hotfix branch into master and development branches and add a tag).
36+
*/
37+
138
var PACKAGE_JSON_FILE = './package.json',
239
RELEASES_NOTES_FILE = './RELEASES NOTES.txt';
340

0 commit comments

Comments
 (0)