|
1 | | -# deployKF - cli |
| 1 | +# deployKF - Command Line Interface (CLI) |
2 | 2 |
|
3 | | -The CLI for [deployKF](https://github.com/deployKF/deployKF). |
| 3 | +[](https://github.com/deployKF/cli/actions/workflows/check-commit.yml) |
| 4 | + |
| 5 | +This repo contains the command line interface (CLI) for [deployKF](https://github.com/deployKF/deployKF). |
| 6 | + |
| 7 | +## Install |
| 8 | + |
| 9 | +You can install the `deploykf` CLI by downloading the appropriate binary for your OS from the [releases page](https://github.com/deployKF/cli/releases). |
| 10 | + - You may wish to rename the binary to `deploykf` (or `deploykf.exe` on Windows). |
| 11 | + - On Unix-like systems, you may need to make the binary executable by running `chmod +x deploykf`. |
4 | 12 |
|
5 | 13 | ## Usage |
6 | 14 |
|
7 | 15 | The simplest usage of the `deploykf` CLI is to run the following command: |
8 | 16 |
|
9 | 17 | ```bash |
10 | 18 | deploykf \ |
11 | | - --source-version=v0.1.0 \ |
12 | | - --values "./custom-values.yaml" \ |
13 | | - --output-dir "./GENERATOR_OUTPUT" |
| 19 | + --source-version v0.1.0 \ |
| 20 | + --values ./custom-values.yaml \ |
| 21 | + --output-dir ./GENERATOR_OUTPUT |
14 | 22 | ``` |
15 | 23 |
|
16 | | -Which will generate deployKF manifests in the `./GENERATOR_OUTPUT` directory based on the `v0.1.0` source version and your `./values.yaml` file. |
17 | | - |
18 | | -The `--source-version` flag must be a tag associated with a [deployKF release](https://github.com/deployKF/deployKF/releases). |
| 24 | +This command will generate deployKF manifests in the `./GENERATOR_OUTPUT` directory using the `v0.1.0` source version and the values specified in your `./custom-values.yaml` file. |
| 25 | +Note that the `--source-version` flag must correspond to a tag from a [deployKF release](https://github.com/deployKF/deployKF/releases). |
19 | 26 |
|
20 | 27 | ## Development |
21 | 28 |
|
22 | | -Running `make build` will build the binary for your local platform and output it to `./bin/deploykf`. |
| 29 | +Here are some helpful commands when developing the CLI: |
| 30 | + |
| 31 | +- `make build`: Builds the binary for your local platform and outputs it to `./bin/deploykf`. |
| 32 | +- `make install`: Installs the binary to `/usr/local/bin`. |
| 33 | +- `make lint`: Runs `golangci-lint` against the codebase to check for errors. |
| 34 | +- `make lint-fix`: Attempts to automatically fix any linting errors found. |
23 | 35 |
|
24 | | -Running `make install` will install the binary to `/usr/local/bin`. |
| 36 | +## Releasing |
25 | 37 |
|
26 | | -Running `make lint` will run `golangci-lint` against the codebase. |
| 38 | +To release a new version of the CLI, follow these steps: |
27 | 39 |
|
28 | | -Running `make lint-fix` will attempt to automatically fix linting errors. |
| 40 | +1. For a new minor or major release, create a `release-*` branch first. |
| 41 | + - For example, for the `v0.2.0` release, create a new branch called `release-0.2`. |
| 42 | + - This allows for the continued release of bug fixes to older CLI versions. |
| 43 | +2. Create a new tag on the appropriate release branch for the version you are releasing. |
| 44 | + - For instance, you might create `v0.1.1` or `v0.1.1-alpha.1` on the `release-0.1` branch. |
| 45 | + - Remember to create tags only on the `release-*` branches, not on the `main` branch. |
| 46 | +3. When a new semver tag is created, a workflow will automatically create a GitHub draft release. |
| 47 | + - The release will include binaries and corresponding SHA256 checksums for all supported platforms. |
| 48 | + - Don't forget to add the changelog to release notes. |
| 49 | +4. Manually publish the draft release. |
0 commit comments