Skip to content

Commit a220f01

Browse files
Updated README.md
1 parent 07087b1 commit a220f01

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"cSpell.words": [
3+
"repo"
4+
]
5+
}

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,41 @@
11
# git-ver
2-
Yet another set of bash utilities to help with semantic versioning
2+
3+
Yet another set of bash utilities to help with semantic versioning.
4+
5+
## Motivation
6+
7+
I wanted a highly portable tool with no dependency on tools outside of git. In searching the web I found nothing that suited my needs.
8+
9+
### Why bash?
10+
11+
It's a shell that I use on Windows and of course linux. It's also supported on Mac OS. Many CI/CD tools are built on `docker`, and therefore, by default, Linux.
12+
13+
### Why not just use GitVersion?
14+
15+
I really wanted to, but given that it requires Mono on non-Windows Operating Systems, it's quite the heavyweight to install correctly at the start up of a container. And since the project I was doing this for is .Net Core, I eschewed putting both tools on the same container, yet I wanted functionality similar to GitVersion. That meant I had to write it.
16+
17+
## Usage
18+
19+
`usage: git-ver [command] [command arguments]`
20+
21+
For more details on the individual commands type `git-ver help [command]`
22+
23+
### List of commands:
24+
25+
`get-major` : Returns the major number from the current semantic version number. (Major.Minor.Patch[-info+metadata])
26+
27+
`get-minor` : Returns the minor number from the current semantic version number.
28+
29+
`get-patch` : Returns the patch number from the current semantic version number
30+
31+
`get-prefix` : Returns the version with a prefix, prefix defaults to 'v'
32+
33+
`get-rev` : Counts the number of commits from the last tag and returns that as a revision number. (placed in info as _info_**#**)
34+
35+
`get-semver` : Retrieves a full semantic version, optionally with
36+
37+
`get-suffix` : gets the suffix for a pre-release semantic version. (e.g. -alpha1)
38+
39+
`get-version` : Gets the version number in Major.Minor.Patch format
40+
41+
`help` : Displays this help information.

0 commit comments

Comments
 (0)