Skip to content

Commit

Permalink
Issue #357 Fix version number in Maven (#482)
Browse files Browse the repository at this point in the history
It is not usual for a version number to be prefixed with v... in Maven.
An easy fix to strip this "v" when it exists.
  • Loading branch information
davidjlynn committed Mar 15, 2022
1 parent ebeafcb commit a0aae67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions build.gradle
Expand Up @@ -11,6 +11,10 @@ publishing {
groupId = 'io.github.pseudomuto'
artifactId = rootProject.name
version = System.getenv("GITHUB_REF_NAME")
// Strip "v" from version number
if (version.startsWith("v")) {
version = version.substring(1)
}

pom {
name = groupId + ':' + rootProject.name
Expand Down
2 changes: 1 addition & 1 deletion examples/gradle/build.gradle
Expand Up @@ -9,7 +9,7 @@ protobuf {
}
plugins {
doc {
artifact = "io.github.pseudomuto:protoc-gen-doc:v1.5.1"
artifact = "io.github.pseudomuto:protoc-gen-doc:1.5.1"
}
}

Expand Down

0 comments on commit a0aae67

Please sign in to comment.