Skip to content

Commands

Casey edited this page Oct 23, 2022 · 9 revisions
  1. increment-version
  2. increment-version-with-git
  3. increment-version-with-git-hints

increment-version

Running this command allows you to modify the version in .csproj files by a specified increment.

Usage: dotnet-version increment-version [options]

Options:
  -d|--directory <DIRECTORY>                  The directory containing the csproj files.
  -s|--search-option <SEARCH_OPTION>          The search option to use with the target directory. Defaults to
                                              AllDirectories.
                                              Allowed values are: AllDirectories, TopDirectoryOnly.
  -v|--version-increment <VERSION_INCREMENT>  Indicates how to increment the version.
                                              Allowed values are: Unknown, None, Patch, Minor, Major.
  -e|--exit-beta                              Determines whether beta mode should be exited. This will set the version
                                              to 1.0.0 if the version was lower.
  -?|-h|--help                                Show help information.

increment-version-with-git

Running this command allows you to modify the version in .csproj files by a specified increment and commits the change to the specified branch. For authorization issues, see configuring remote target.

Usage: dotnet-version increment-version-with-git [options]

Options:
  -g|--git-directory <GIT_DIRECTORY>          The directory containing the .git folder.
  -d|--target-directory <TARGET_DIRECTORY>    The directory to use for file versioning. Defaults to the GitDirectory if
                                              not provided.
  -s|--search-option <SEARCH_OPTION>          The search option to use with the target directory. Defaults to
                                              AllDirectories.
                                              Allowed values are: AllDirectories, TopDirectoryOnly.
  -t|--remote-target <REMOTE_TARGET>          The git remote target. Defaults to 'origin'.
  -b|--branch-name <BRANCH_NAME>              The name of the branch to update.
  -a|--author-email <AUTHOR_EMAIL>            The git commit author's email address.
  -v|--version-increment <VERSION_INCREMENT>  Indicates how to increment the version.
                                              Allowed values are: Unknown, None, Patch, Minor, Major.
  -e|--exit-beta                              Determines whether beta mode should be exited. This will set the version
                                              to 1.0.0 if the version was lower.
  -tp|--tag-prefix <TAG_PREFIX>               The prefix value to use for the version tag in git. Defaults to 'v'.
  -ts|--tag-suffix <TAG_SUFFIX>               The suffix value to use for the version tag in git.
  -?|-h|--help                                Show help information.

increment-version-with-git-hints

Running this command allows you to modify the version in .csproj files using a determined version increment based on git commit message hints and then commits the change to the specified branch. In order for this command to work as intended, it's important that your commits follow the commit convention. For authorization issues, see configuring remote target.

Usage: dotnet-version increment-version-with-git-hints [options]

Options:
  -g|--git-directory <GIT_DIRECTORY>        The directory containing the .git folder.
  -d|--target-directory <TARGET_DIRECTORY>  The directory to use for file versioning. Defaults to the GitDirectory if
                                            not provided.
  -s|--search-option <SEARCH_OPTION>        The search option to use with the target directory. Defaults to
                                            AllDirectories.
                                            Allowed values are: AllDirectories, TopDirectoryOnly.
  -t|--remote-target <REMOTE_TARGET>        The git remote target. Defaults to 'origin'.
  -b|--branch-name <BRANCH_NAME>            The name of the branch to update.
  -a|--author-email <AUTHOR_EMAIL>          The git commit author's email address.
  -tp|--tag-prefix <TAG_PREFIX>             The prefix value to use for the version tag in git. Defaults to 'v'.
  -ts|--tag-suffix <TAG_SUFFIX>             The suffix value to use for the version tag in git.
  -?|-h|--help                              Show help information.
Clone this wiki locally