feat: Renames some options, adds a require-configuration option that fails if configuration is not found.
All checks were successful
CI / Ubuntu (push) Successful in 2m19s
All checks were successful
CI / Ubuntu (push) Successful in 2m19s
This commit is contained in:
@@ -10,7 +10,9 @@ by the module that a `Version.swift` file resides in. It also declares the strat
|
||||
new versions.
|
||||
|
||||
The command-line tool comes with a command to generate the configuration file for you, this should
|
||||
be ran from the root of your project.
|
||||
be ran from the root of your project or by specifying the path to write the configuration file to
|
||||
using the `-f | --configuration-file` option. The below examples assume that you're running in the
|
||||
root project directory.
|
||||
|
||||
```bash
|
||||
bump-version config generate --target-module my-tool
|
||||
|
||||
@@ -39,10 +39,18 @@ are ignored if your configuration or options specify to use a `branch` strategy.
|
||||
bump-version bump --minor
|
||||
```
|
||||
|
||||
If you want to use the default configuration without generating your own project configuration, then
|
||||
you can specify the path or module to the bump command. The default configuration will use the
|
||||
`gitTag` strategy without any pre-release strategy.
|
||||
|
||||
```bash
|
||||
bump-version bump --minor --target-module my-tool
|
||||
```
|
||||
|
||||
Show the output, but don't update the version file.
|
||||
|
||||
```bash
|
||||
bump-version bump --major --dry-run
|
||||
bump-version bump --major --print
|
||||
```
|
||||
|
||||
### Generate Command
|
||||
@@ -66,11 +74,10 @@ Generates a configuration file based on the passed in options.
|
||||
|
||||
The following options are used to declare strategy used for deriving the version.
|
||||
|
||||
| Long | Description |
|
||||
| -------- | ------------------------------------------------------- |
|
||||
| --branch | Use the branch strategy |
|
||||
| --semvar | Use the semvar strategy (default) |
|
||||
| --print | Print the output to stdout instead of generating a file |
|
||||
| Long | Description |
|
||||
| -------- | --------------------------------- |
|
||||
| --branch | Use the branch strategy |
|
||||
| --semvar | Use the semvar strategy (default) |
|
||||
|
||||
##### Generate Configuration Example
|
||||
|
||||
|
||||
@@ -9,13 +9,13 @@ of their usage.
|
||||
|
||||
### General Options
|
||||
|
||||
| Short | Long | Argument | Description |
|
||||
| ----- | --------------- | -------- | -------------------------------------------------------------------- |
|
||||
| N/A | --dry-run | N/A | Perform the command, but don't write any output files |
|
||||
| N/A | --git-directory | <path> | The path to the root of your project, defaults to current directory |
|
||||
| -h | --help | N/A | Show help for a command |
|
||||
| -v | --verbose | N/A | Increase logging level, can be passed multiple times (example: -vvv) |
|
||||
| N/A | --version | N/A | Show the version of the command line tool |
|
||||
| Short | Long | Argument | Description |
|
||||
| ----- | ------------------- | -------- | -------------------------------------------------------------------- |
|
||||
| N/A | --print | N/A | Perform the command, but don't write any output files |
|
||||
| N/A | --project-directory | <path> | The path to the root of your project, defaults to current directory |
|
||||
| -h | --help | N/A | Show help for a command |
|
||||
| -v | --verbose | N/A | Increase logging level, can be passed multiple times (example: -vvv) |
|
||||
| N/A | --version | N/A | Show the version of the command line tool |
|
||||
|
||||
### Configuration Options
|
||||
|
||||
@@ -30,6 +30,7 @@ of their usage.
|
||||
| N/A | --require-existing-semvar | N/A | Fail if an existing semvar is not found in the version file. |
|
||||
| -c | --custom-command | <arguments> | Use a custom command strategy for the version (any options need to proceed a '--') |
|
||||
| N/A | --commit-sha/--no-commit-sha | N/A | Use the commit sha with branch version or pre-release strategy |
|
||||
| N/A | --require-configuration | N/A | Fail if a configuration file is not found |
|
||||
|
||||
#### Pre-Release Options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user