A simple rust tool for releasing projects 🚀.
bash
cargo install sheepit
You can configure Sheepit by placing a sheepit.toml
or .sheepit.toml
file in your repository. This file has the
following options:
```toml [repository] branchpattern = 'branch/{version}' # The naming pattern for the branch if one is created. commitmessage = 'Sheeping {version}' # Commit message if we will create a commit defaultbranch = 'main' # Default branch in the repo. enablebranch = true # When true sheepit will create a release branch before commiting and tagging. enablecommit = true # When true sheepit will apply transforms and commit changes. enabletag = true # When true sheepit will create a tag from your latest commit. enablepush = true # When true sheepit will push changes to origin (unless you dry-run) tagpattern = '{version}' # The naming pattern to use when creating a tag
[[subprojects]] repo_url = 'git@github.com:some-user/test-sub-sheep.git' # Git remote url for subproject
[[transforms]] path = 'relative/path.file' # The relative path to the file. find = 'version: {version}' # An optional, explicit string to find. If omitted, replace will be used for find & replace. replace = 'version: sheep_{version}' # The replace string. ```
The version token is {version}
. This can be used in a number of configuration properties and may represent the repo's
current version (as determined by the highest semver tag), or the next version. Generally the following rules apply:
{version}
is used in naming patterns or commit message it will be the next version.{version}
is used within a transform's find
string it will be the previous version.{version}
is used within a transform's replace
string it will be the next version.
replace
is used for both find
and replace
, {version}
will expand to the previous version while finding,
then the next versions file replacing.You don't need to specify all of the configuration properties listed at the top of the section. Sheepit tries to pick reasonable defaults. Defaults can be found here: config.rs.
Sheepit supports semantic version bumps. You can bump the major, minor and patch version. During a version bump, sheepit will do the following:
```bash
sheepit major # bumps the version to 2.0.0 sheepit minor # bumps the version to 1.2.0 sheepit patch # bumps the version to 1.1.2 ```