Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-release: Add prefix to semver #944

Merged
merged 1 commit into from
Apr 18, 2022

Conversation

SimonTate
Copy link
Contributor

To allow different release names other than specifically mm.vv.pp, this
adds the ability to use a prefix too.

For example, you can use:

$ git release --semver minor --prefix "prefix-"

This would allow the previous tags to be in the form prefix-0.1.0. A more obvious use case for this would be a single letter, such as v or r to use tags like: r0.1.0 or v0.1.0.

@SimonTate
Copy link
Contributor Author

I've tested this on MacOS (with GNU bash, version 5.1.8), but not Linux.

.
.SH "NAME"
\fBgit\-release\fR \- Commit, tag and push changes to the repository
.
.SH "SYNOPSIS"
\fBgit\-release\fR [<tagname> | \-\-semver <name>] [\-r <remote>] [\-m <commit info>] [\-\-no\-empty\-commit] [\-c] [\-s] [\-u <key-id>] [[\-\-] <hook arguments\.\.\.>]
\fBgit\-release\fR [<tagname> | \-\-semver <name>] [\-r <remote>] [\-m <commit info>] [\-\-no\-empty\-commit] [\-c] [\-s] [\-u <key\-id>] [[\-\-] <hook arguments\.\.\.>]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change of markdown is not submitted?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be corrected now @spacewander

bin/git-release Outdated
--prefix)
test -z "$2" &&
exit_with_msg "prefix string required for --prefix option"
prefix=$2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
prefix=$2
prefix="$2"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion taken in latest commit

To allow different release names other than specifically mm.vv.pp, this
adds the ability to use a prefix too.

For example, you can use:

```
$ git release --semver minor --prefix "prefix-"
```

This would allow the previous tags to be in the form `prefix-0.1.0`. A
more obvious use case for this would be a single letter, such as `v` or
`r` to use tags like: `r0.1.0` or `v0.1.0`.
@spacewander spacewander merged commit 716459f into tj:master Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants