Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

update change log to revise cleaner cli argument options, modify release note format, add branch option to target specific branch

Ed Plato777546027ed8
diff --git a/doc/developing.md b/doc/developing.md
index e3c4cc17a..6aacb3103 100644
--- a/doc/developing.md
+++ b/doc/developing.md
@@ -30,7 +30,7 @@ To build the app with an incomplete configuration, prefix the command like this:
**`npm run analyze`**: Runs Webpack Bundle Analyzer to visualize size of output files with an interactive zoomable treemap. Default analyze interface is served at [http://127.0.0.1:8888/](http://127.0.0.1:8888/).
-**`npm run notes`**: Runs [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator) to automatically build release notes. For individual release notes, add release tag option as first argument after script, for example `npm run notes v3.3.1`. Will use `docker` by default. To use `ruby`, add `ruby` as second argument after script command. For example `npm run notes '' ruby`.
+**`npm run notes`**: Runs [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator) to automatically build release notes. For individual release notes, add release tag argument option, for example `npm run notes tag=v3.3.1`. Will use `docker` by default. To use `ruby`, add `ruby=true`. For example `npm run notes ruby=true`. Will use `master` branch by default. To use specific branch, add `branch=develop`. Combine arguments, for example `npm run notes ruby=true branch=develop`.
**`npm run watch`**: Builds and serves local Development mode Webpack bundle in watch mode using Webpack Dev Server (*Note: It is necessary to wait for the initial build to finish before being able to develop*). JS and CSS bundles are updated automatically when source files change. You must run `npm run build` or `npm run build:config` first to make a request to the GIBS `GetCapabilities` API and build the configuration files.
**`npm run watch:debug`**: Injects a global `DEBUG` object into `main.js`. This will activate `react-logger` which logs the before and after state of each action.
diff --git a/doc/release_notes.md b/doc/release_notes.md
index 5c0fd76a5..a8d4f1fae 100644
--- a/doc/release_notes.md
+++ b/doc/release_notes.md
@@ -11,6 +11,9 @@ You will need to [create your own authentication token](https://github.com/githu
```
github_changelog_generator -u nasa-gibs -p worldview
--no-author --bugs-label '## Technical Updates / Bugs:'
+--enhancement-label '## Implemented enhancements:'
+--issues-label '## Closed issues:'
+--pr-label '## Merged pull requests:'
--security-label '## External Dependency Updates:'
--security-labels 'external dependency'
--removed-label '## Story Changes:'
@@ -25,6 +28,9 @@ github_changelog_generator -u nasa-gibs -p worldview
docker run -it --rm -v /${PWD}:/wkDir
ferrarimarco/github-changelog-generator -u nasa-gibs -p worldview
--no-author --bugs-label '## Technical Updates / Bugs:'
+--enhancement-label '## Implemented enhancements:'
+--issues-label '## Closed issues:'
+--pr-label '## Merged pull requests:'
--security-label '## External Dependency Updates:'
--security-labels 'external dependency'
--removed-label '## Story Changes:'
diff --git a/tasks/releaseNotes.js b/tasks/releaseNotes.js
index e7ba3566e..ea36f4416 100644
--- a/tasks/releaseNotes.js
+++ b/tasks/releaseNotes.js
@@ -1,8 +1,17 @@
/* eslint no-template-curly-in-string: "off" */
const shell = require('shelljs');
-const args = process.argv.slice(2);
-const sinceArg = args[0];
-const rubyArg = args[1];
+const args = process.argv;
+
+// save arguments to object for options check below
+const argStore = {};
+args.forEach((val) => {
+ if (val.match(/=/)) {
+ const splitArg = val.split('=');
+ const key = splitArg[0];
+ const value = splitArg[1];
+ argStore[key] = value;
+ }
+});
const GITHUB_CHANGELOG_GENERATOR_TOKEN = process.env.GITHUB_CHANGELOG_GENERATOR_TOKEN;
@@ -11,22 +20,21 @@ if (!GITHUB_CHANGELOG_GENERATOR_TOKEN) {
} else {
console.log('\u{1b}[32mA GitHub release note generation initiated. This will take a few minutes to complete.\u{1b}[0m');
- let cmdPrefix;
// run docker command by default, but allow ruby using command line argument
- if (rubyArg === 'ruby') {
- cmdPrefix = 'github_changelog_generator';
- } else {
- cmdPrefix = 'docker run -it --rm -v /${PWD}:/wkDir ferrarimarco/github-changelog-generator';
- }
+ const cmdPrefix = argStore.ruby ? 'github_changelog_generator' : 'docker run -it --rm -v /${PWD}:/wkDir ferrarimarco/github-changelog-generator';
- // add --since v3.4.0 tag to limit compiled release notes
+ // add --since TAG ARGUMENT to limit compiled release notes
// NOTE: A complete API request of entire commit history is still required due to GitHub's API, so this won't save you much time
- const sinceOption = sinceArg ? `--since-tag ${sinceArg} ` : '';
+ const sinceOption = argStore.tag ? ` --since-tag ${argStore.tag}` : '';
+
+ // add --release-branch BRANCH ARGUMENT. default branch is master
+ const branchOption = argStore.branch ? ` --release-branch ${argStore.branch}` : '';
const cmd = `${cmdPrefix} -u nasa-gibs -p worldview --no-author --bugs-label '## Technical Updates / Bugs:' \
+--enhancement-label '## Implemented enhancements:' --issues-label '## Closed issues:' --pr-label '## Merged pull requests:' \
--security-label '## External Dependency Updates:' --security-labels 'external dependency' --removed-label \
'## Story Changes:' --removed-labels 'story,Story' --deprecated-label '## Layer Changes:' --deprecated-labels \
-'layer,Layer' ${sinceOption}--token ${GITHUB_CHANGELOG_GENERATOR_TOKEN}`;
+'layer,Layer'${sinceOption}${branchOption} --token ${GITHUB_CHANGELOG_GENERATOR_TOKEN}`;
shell.exec(cmd);
}