From ff0f696859f9d49b3273ec078621776f14562afb Mon Sep 17 00:00:00 2001 From: Ronnie Smith Date: Sat, 24 Aug 2024 11:33:51 -0700 Subject: [PATCH] Add newlines in batch docs for proper markdown lists * remove docs/cli from git as its a generated directory anyway --- .gitignore | 1 + cmd/batch.go | 2 + docs/cli/changie.md | 31 -------------- docs/cli/changie_batch.md | 52 ----------------------- docs/cli/changie_completion.md | 28 ------------ docs/cli/changie_completion_bash.md | 47 -------------------- docs/cli/changie_completion_fish.md | 38 ----------------- docs/cli/changie_completion_powershell.md | 35 --------------- docs/cli/changie_completion_zsh.md | 49 --------------------- docs/cli/changie_init.md | 38 ----------------- docs/cli/changie_latest.md | 29 ------------- docs/cli/changie_merge.md | 30 ------------- docs/cli/changie_new.md | 35 --------------- docs/cli/changie_next.md | 34 --------------- 14 files changed, 3 insertions(+), 446 deletions(-) delete mode 100644 docs/cli/changie.md delete mode 100644 docs/cli/changie_batch.md delete mode 100644 docs/cli/changie_completion.md delete mode 100644 docs/cli/changie_completion_bash.md delete mode 100644 docs/cli/changie_completion_fish.md delete mode 100644 docs/cli/changie_completion_powershell.md delete mode 100644 docs/cli/changie_completion_zsh.md delete mode 100644 docs/cli/changie_init.md delete mode 100644 docs/cli/changie_latest.md delete mode 100644 docs/cli/changie_merge.md delete mode 100644 docs/cli/changie_new.md delete mode 100644 docs/cli/changie_next.md diff --git a/.gitignore b/.gitignore index 295a0c0a..95e8eba7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ coverage.html .cache/ site/ venv/ +docs/cli/ # goreleaser builds dist/ diff --git a/cmd/batch.go b/cmd/batch.go index af98f7b6..2c40e510 100644 --- a/cmd/batch.go +++ b/cmd/batch.go @@ -56,6 +56,7 @@ func NewBatch( Long: `Merges all unreleased changes into one version changelog. Batch takes one argument for the next version to use, below are possible options. + * A specific semantic version value, with optional prefix * Major, minor or patch to bump one level by one * Auto which will automatically bump based on what changes were found @@ -66,6 +67,7 @@ Line breaks are added before each formatted line except the first, if you wish t add more line breaks include them in your format configurations. Changes are sorted in the following order: + * Components if enabled, in order specified by config.components * Kinds if enabled, in order specified by config.kinds * Timestamp oldest first`, diff --git a/docs/cli/changie.md b/docs/cli/changie.md deleted file mode 100644 index 905c16d7..00000000 --- a/docs/cli/changie.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "changie" -description: "Help for using the 'changie' command" ---- -## changie - -changie handles conflict-free changelog management - -### Synopsis - -Changie keeps your changes organized and attached to your code. - -Changie is aimed at seemlessly integrating into your release process while also -being easy to use for developers and your release team. - -### Options - -``` - -h, --help help for changie -``` - -### SEE ALSO - -* [changie batch](changie_batch.md) - Batch unreleased changes into a single changelog -* [changie completion](changie_completion.md) - Generate the autocompletion script for the specified shell -* [changie init](changie_init.md) - Initialize a new changie skeleton -* [changie latest](changie_latest.md) - Echos the latest release version number -* [changie merge](changie_merge.md) - Merge all versions into one changelog -* [changie new](changie_new.md) - Create a new change file -* [changie next](changie_next.md) - Next echos the next version based on semantic versioning - diff --git a/docs/cli/changie_batch.md b/docs/cli/changie_batch.md deleted file mode 100644 index 77a1c033..00000000 --- a/docs/cli/changie_batch.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: "changie batch" -description: "Help for using the 'changie batch' command" ---- -## changie batch - -Batch unreleased changes into a single changelog - -### Synopsis - -Merges all unreleased changes into one version changelog. - -Batch takes one argument for the next version to use, below are possible options. -* A specific semantic version value, with optional prefix -* Major, minor or patch to bump one level by one -* Auto which will automatically bump based on what changes were found - -The new version changelog can then be modified with extra descriptions, -context or with custom tweaks before merging into the main file. -Line breaks are added before each formatted line except the first, if you wish to -add more line breaks include them in your format configurations. - -Changes are sorted in the following order: -* Components if enabled, in order specified by config.components -* Kinds if enabled, in order specified by config.kinds -* Timestamp oldest first - -``` -changie batch version|major|minor|patch|auto [flags] -``` - -### Options - -``` - -d, --dry-run Print batched changes instead of writing to disk, does not delete fragments - --footer-path string Path to version footer file in unreleased directory - -f, --force Force a new version file even if one already exists - --header-path string Path to version header file in unreleased directory - -h, --help help for batch - -i, --include strings Include extra directories to search for change files, relative to change directory - -k, --keep Keep change fragments instead of deleting them - -m, --metadata strings Metadata values to append to version - --move-dir string Path to move unreleased changes - -p, --prerelease strings Prerelease values to append to version - -j, --project string Specify which project version we are batching - --remove-prereleases Remove existing prerelease versions -``` - -### SEE ALSO - -* [changie](changie.md) - changie handles conflict-free changelog management - diff --git a/docs/cli/changie_completion.md b/docs/cli/changie_completion.md deleted file mode 100644 index cacc8fe3..00000000 --- a/docs/cli/changie_completion.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: "changie completion" -description: "Help for using the 'changie completion' command" ---- -## changie completion - -Generate the autocompletion script for the specified shell - -### Synopsis - -Generate the autocompletion script for changie for the specified shell. -See each sub-command's help for details on how to use the generated script. - - -### Options - -``` - -h, --help help for completion -``` - -### SEE ALSO - -* [changie](changie.md) - changie handles conflict-free changelog management -* [changie completion bash](changie_completion_bash.md) - Generate the autocompletion script for bash -* [changie completion fish](changie_completion_fish.md) - Generate the autocompletion script for fish -* [changie completion powershell](changie_completion_powershell.md) - Generate the autocompletion script for powershell -* [changie completion zsh](changie_completion_zsh.md) - Generate the autocompletion script for zsh - diff --git a/docs/cli/changie_completion_bash.md b/docs/cli/changie_completion_bash.md deleted file mode 100644 index 505560a7..00000000 --- a/docs/cli/changie_completion_bash.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: "changie completion bash" -description: "Help for using the 'changie completion bash' command" ---- -## changie completion bash - -Generate the autocompletion script for bash - -### Synopsis - -Generate the autocompletion script for the bash shell. - -This script depends on the 'bash-completion' package. -If it is not installed already, you can install it via your OS's package manager. - -To load completions in your current shell session: - - source <(changie completion bash) - -To load completions for every new session, execute once: - -#### Linux: - - changie completion bash > /etc/bash_completion.d/changie - -#### macOS: - - changie completion bash > $(brew --prefix)/etc/bash_completion.d/changie - -You will need to start a new shell for this setup to take effect. - - -``` -changie completion bash -``` - -### Options - -``` - -h, --help help for bash - --no-descriptions disable completion descriptions -``` - -### SEE ALSO - -* [changie completion](changie_completion.md) - Generate the autocompletion script for the specified shell - diff --git a/docs/cli/changie_completion_fish.md b/docs/cli/changie_completion_fish.md deleted file mode 100644 index 5bbc8329..00000000 --- a/docs/cli/changie_completion_fish.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "changie completion fish" -description: "Help for using the 'changie completion fish' command" ---- -## changie completion fish - -Generate the autocompletion script for fish - -### Synopsis - -Generate the autocompletion script for the fish shell. - -To load completions in your current shell session: - - changie completion fish | source - -To load completions for every new session, execute once: - - changie completion fish > ~/.config/fish/completions/changie.fish - -You will need to start a new shell for this setup to take effect. - - -``` -changie completion fish [flags] -``` - -### Options - -``` - -h, --help help for fish - --no-descriptions disable completion descriptions -``` - -### SEE ALSO - -* [changie completion](changie_completion.md) - Generate the autocompletion script for the specified shell - diff --git a/docs/cli/changie_completion_powershell.md b/docs/cli/changie_completion_powershell.md deleted file mode 100644 index 76451d97..00000000 --- a/docs/cli/changie_completion_powershell.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "changie completion powershell" -description: "Help for using the 'changie completion powershell' command" ---- -## changie completion powershell - -Generate the autocompletion script for powershell - -### Synopsis - -Generate the autocompletion script for powershell. - -To load completions in your current shell session: - - changie completion powershell | Out-String | Invoke-Expression - -To load completions for every new session, add the output of the above command -to your powershell profile. - - -``` -changie completion powershell [flags] -``` - -### Options - -``` - -h, --help help for powershell - --no-descriptions disable completion descriptions -``` - -### SEE ALSO - -* [changie completion](changie_completion.md) - Generate the autocompletion script for the specified shell - diff --git a/docs/cli/changie_completion_zsh.md b/docs/cli/changie_completion_zsh.md deleted file mode 100644 index 4045411f..00000000 --- a/docs/cli/changie_completion_zsh.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: "changie completion zsh" -description: "Help for using the 'changie completion zsh' command" ---- -## changie completion zsh - -Generate the autocompletion script for zsh - -### Synopsis - -Generate the autocompletion script for the zsh shell. - -If shell completion is not already enabled in your environment you will need -to enable it. You can execute the following once: - - echo "autoload -U compinit; compinit" >> ~/.zshrc - -To load completions in your current shell session: - - source <(changie completion zsh) - -To load completions for every new session, execute once: - -#### Linux: - - changie completion zsh > "${fpath[1]}/_changie" - -#### macOS: - - changie completion zsh > $(brew --prefix)/share/zsh/site-functions/_changie - -You will need to start a new shell for this setup to take effect. - - -``` -changie completion zsh [flags] -``` - -### Options - -``` - -h, --help help for zsh - --no-descriptions disable completion descriptions -``` - -### SEE ALSO - -* [changie completion](changie_completion.md) - Generate the autocompletion script for the specified shell - diff --git a/docs/cli/changie_init.md b/docs/cli/changie_init.md deleted file mode 100644 index e269204f..00000000 --- a/docs/cli/changie_init.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "changie init" -description: "Help for using the 'changie init' command" ---- -## changie init - -Initialize a new changie skeleton - -### Synopsis - -Initialize a few changie specifics. - -* Folder to place all change files -* Subfolder to place all unreleased changes -* Header file to place on top of the changelog -* Output file when generating a changelog -* Unreleased folder includes a .gitkeep file - -Values will also be saved in a changie config at .changie.yaml. -Default values follow keep a changelog and semver specs but are customizable. - -``` -changie init [flags] -``` - -### Options - -``` - -d, --dir string directory for all changes (default ".changes") - -f, --force force initialize even if config already exist - -h, --help help for init - -o, --output string file path to output our changelog (default "CHANGELOG.md") -``` - -### SEE ALSO - -* [changie](changie.md) - changie handles conflict-free changelog management - diff --git a/docs/cli/changie_latest.md b/docs/cli/changie_latest.md deleted file mode 100644 index 19a773fe..00000000 --- a/docs/cli/changie_latest.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "changie latest" -description: "Help for using the 'changie latest' command" ---- -## changie latest - -Echos the latest release version number - -### Synopsis - -Echo the latest release version number to be used by CI tools. - -``` -changie latest [flags] -``` - -### Options - -``` - -h, --help help for latest - -j, --project string Specify which project we are interested in - -r, --remove-prefix Remove 'v' prefix before echoing - --skip-prereleases Excludes prereleases to determine the latest version. -``` - -### SEE ALSO - -* [changie](changie.md) - changie handles conflict-free changelog management - diff --git a/docs/cli/changie_merge.md b/docs/cli/changie_merge.md deleted file mode 100644 index e87093e0..00000000 --- a/docs/cli/changie_merge.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: "changie merge" -description: "Help for using the 'changie merge' command" ---- -## changie merge - -Merge all versions into one changelog - -### Synopsis - -Merge all version files into one changelog file and run any replacement commands. - -Note that a newline is added between each version file. - -``` -changie merge [flags] -``` - -### Options - -``` - -d, --dry-run Print merged changelog instead of writing to disk, will not run replacements - -h, --help help for merge - -u, --include-unreleased string Include unreleased changes with this value as the header -``` - -### SEE ALSO - -* [changie](changie.md) - changie handles conflict-free changelog management - diff --git a/docs/cli/changie_new.md b/docs/cli/changie_new.md deleted file mode 100644 index 722cdf4d..00000000 --- a/docs/cli/changie_new.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "changie new" -description: "Help for using the 'changie new' command" ---- -## changie new - -Create a new change file - -### Synopsis - -Creates a new change file. -Change files are processed when batching a new release. -Each version is merged together for the overall project changelog. - -``` -changie new [flags] -``` - -### Options - -``` - -b, --body string Set the change body without a prompt - -c, --component string Set the change component without a prompt - -m, --custom strings Set custom values without a prompt - -d, --dry-run Print new fragment instead of writing to disk - -e, --editor Edit body message using your text editor defined by 'EDITOR' env variable - -h, --help help for new - -k, --kind string Set the change kind without a prompt - -j, --projects strings Set the change projects without a prompt -``` - -### SEE ALSO - -* [changie](changie.md) - changie handles conflict-free changelog management - diff --git a/docs/cli/changie_next.md b/docs/cli/changie_next.md deleted file mode 100644 index 835893c3..00000000 --- a/docs/cli/changie_next.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -title: "changie next" -description: "Help for using the 'changie next' command" ---- -## changie next - -Next echos the next version based on semantic versioning - -### Synopsis - -Next increments version based on semantic versioning. -Check latest version and increment part (major, minor, patch). -If auto is used, it will try and find the next version based on what kinds of changes are -currently unreleased. -Echo the next release version number to be used by CI tools or other commands like batch. - -``` -changie next major|minor|patch|auto [flags] -``` - -### Options - -``` - -h, --help help for next - -i, --include strings Include extra directories to search for change files, relative to change directory - -m, --metadata strings Metadata values to append to version - -p, --prerelease strings Prerelease values to append to version - -j, --project string Specify which project we are interested in -``` - -### SEE ALSO - -* [changie](changie.md) - changie handles conflict-free changelog management -