Skip to content

rogervinas/grgit-get-version

Repository files navigation

grgit gradle plugin to get current version

See doc at https://ajoberstar.org/grgit/grgit-describe.html

  1. First time
./gradlew getVersion

> Task :getVersion
SNAPSHOT VERSION 0.0.0.7526fa4
  1. We add a tag
git tag 1.0.0
./gradlew getVersion

> Task :getVersion
RELEASED VERSION 1.0.0
  1. We add another commit
git commit --allow-empty -m "Another commit"
./gradlew getVersion

> Task :getVersion
SNAPSHOT VERSION 1.0.0.99cb359
  1. We add another tag
git tag 1.0.1
./gradlew getVersion

> Task :getVersion
RELEASED VERSION 1.0.1

About

Use grgit gradle plugin to get current version

Topics

Resources

Stars

Watchers

Forks

Languages