Skip to content

Commit

Permalink
build: get version from the latest tag
Browse files Browse the repository at this point in the history
Instead of hardcoding version in repository files.
  • Loading branch information
wzieba committed Sep 15, 2023
1 parent cb0f1c4 commit c771b44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion publication.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ def prepareEnvironment() {
ext["signing.password"] = System.getenv('SIGNING_PASSWORD')
}

def static getVersionFromGitTag() {
return 'git describe --abbrev=0 --tags'.execute().text.trim()
}

publishing {
prepareEnvironment()
repositories {
Expand All @@ -29,7 +33,7 @@ publishing {
pom {
group = 'com.parsely'
name = 'parsely'
version = VERSION
version = getVersionFromGitTag()

description = 'The official Parse.ly Android toolkit'
url = 'https://github.com/Parsely/parsely-android'
Expand Down

0 comments on commit c771b44

Please sign in to comment.