https://github.com/rogervinas/grgit-get-version
Use grgit gradle plugin to get current version
https://github.com/rogervinas/grgit-get-version
grgit
Last synced: 7 months ago
JSON representation
Use grgit gradle plugin to get current version
- Host: GitHub
- URL: https://github.com/rogervinas/grgit-get-version
- Owner: rogervinas
- Created: 2022-06-08T11:41:48.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-06-09T10:28:26.000Z (almost 4 years ago)
- Last Synced: 2024-12-27T11:23:54.127Z (over 1 year ago)
- Topics: grgit
- Language: Kotlin
- Homepage:
- Size: 61.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grgit gradle plugin to get current version
See doc at https://ajoberstar.org/grgit/grgit-describe.html
1. First time
```shell
./gradlew getVersion
> Task :getVersion
SNAPSHOT VERSION 0.0.0.7526fa4
```
2. We add a tag
```shell
git tag 1.0.0
./gradlew getVersion
> Task :getVersion
RELEASED VERSION 1.0.0
```
3. We add another commit
```shell
git commit --allow-empty -m "Another commit"
./gradlew getVersion
> Task :getVersion
SNAPSHOT VERSION 1.0.0.99cb359
```
2. We add another tag
```shell
git tag 1.0.1
./gradlew getVersion
> Task :getVersion
RELEASED VERSION 1.0.1
```