OpenFin CLI
![Known Vulnerabilities](https://snyk.io/test/npm/openfin-cli/badge.svg)
Overview
Repo for OpenFin’s CLI tool.
Prerequisites
Node
Node LTS can be downloaded here.
Installation
Run the following command to install the required dependencies:
npm install
Development
Build and run the CLI by running:
$ npm start
This will display the default help text. To pass CLI arguments an extra double dash is required. For example, to launch the OpenFin runtime with the --config
flag, you would run:
$ npm start -- --config
This is because the first set of options gets passed to npm, the second to the actual command that is being invoked npm run start <NPM OPTIONS> -- <CLI OPTIONS>
. By way of another example, to launch Process Manager you would run:
$ npm start -- --launch --config https://cdn.openfin.co/release/apps/openfin/processmanager/app.json
Versioning & Releasing
The release process does the following:
- The package and published to NPM.
To run a new release, follow this process:
1. Create a release branch
Note the new release version and create a new branch from main:
# Fetch and merge latest main branch
$ git checkout main && git pull
# Create new release branch
$ git checkout -b release/v<new-version-number>
# Commit new API version
$ npm version <new-version-number>
# Push release branch remotely
$ git push -u origin release/v<new-version-number>
3. Create a pull request
You should now be able to open a pull request with release/ against main. Get that approved and merged.
4. Create a new release on GitHub
Once your release branch is merged into main, you should now create a release through GitHub:
- Click Create a New Release
- Enter
v<new-version-number>
(e.g. v2.1.0) as both the tag and the release title. Enter release notes in the description field. - If the release is a pre-release, check the pre-release box.
- Click "Publish release"
Once the release is published, the production release workflow is triggered which will:
- Build the CLI tool and create the NPM package
- Publish the NPM package
- Attach the NPM package to the GitHub release
Pre-releases
For pre-releases, follow the save process as above, but check the pre-release box when creating the release on GitHub.
Similarly, pre-releases should be versioned with a pre-release tag (e.g. 2.1.0-beta.1). This will ensure that the pre-release is published to NPM as a pre-release.
VS Code Extensions
The following VS Code extensions are used with this project: