-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README to include usage guidelines (#5)
* Update GitHub Action Version * Update README to include usage guidelines
- Loading branch information
1 parent
2deb6af
commit 9117ccb
Showing
5 changed files
with
26 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
# Versioner | ||
# Versioner | ||
|
||
This is a language agnostic git versioning tool using tags. | ||
|
||
 | ||
## Why this repo | ||
There are plenty of tools available that can generate a version based on Git tags, or viceversa. | ||
I decided to roll my own to offer a very simple approach at versioning, without any faff or unnecessary requirements. | ||
|
||
Most of them follow the SemVer practices | ||
There are plenty of tools available that can generate a version based on Git tags. | ||
However, they are typically: | ||
|
||
- driven by commit messages, not configuration | ||
- dependent on programming languages | ||
|
||
How to use the docker container: | ||
```shell script | ||
docker run -v $(pwd):/repo --rm dragosd2000/versioner | ||
``` | ||
I didn't want to have to introduce a programming language into my pipeline, especially when it was a language that had | ||
absolutely nothing to do with my pipeline, e.g. using an action implemented in JS in a Python project. | ||
I also didn't feel like commit messages were the way to go, typos happen, and then someone needs to go and update it | ||
manually. | ||
|
||
The aim has been to have a very simple approach at versioning without introducing new dependencies, and for it to be | ||
configuration driven. | ||
|
||
## How to use it | ||
|
||
For a specific version, let's say 1.0.2: | ||
```shell script | ||
docker run -v (pwd):/repo --rm dragosd2000/versioner:1.0.16 | ||
Inside your GHA pipeline, simply add the following step: | ||
|
||
```yaml | ||
- uses: DragosDumitrache/[email protected] | ||
``` | ||
Inside your `Jenkinsfiles`, you should be able to define a container pointing to it to use inside your pipeline, or | ||
just invoke the command above inside a docker container. | ||
Incrementing the `major` or `minor` versions is done simply through a bump in your project's | ||
corresponding `version.json` file. When this happens, the `patch` number is reset to 0. In all other cases, the `patch` | ||
version is incrementally calculated from the number of commits added since the previous patch. For consecutive patches, | ||
this approach works best with the `Squash and Merge` strategy. | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"default_branch": "master", | ||
"major": "2", | ||
"minor": "2" | ||
"minor": "3" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters