Skip to content

Commit cd736c7

Browse files
committed
Fix bug in license string parsing
We now use colon as token divider uniformly, never slash, because we sometimes use slash for the licenseName (specifically: "N/A"). I don't know of any case where colon appears in any of these properties.
1 parent d122152 commit cd736c7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

release-version.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ Options include:
105105

106106
# -- Extract project details --
107107

108-
projectDetails=$(mvn -N -Dexec.executable='echo' -Dexec.args='${project.version}/${license.licenseName}/${project.parent.groupId}:${project.parent.artifactId}:${project.parent.version}' exec:exec -q)
109-
currentVersion=${projectDetails%%/*}
110-
projectDetails=${projectDetails#*/}
111-
licenseName=${projectDetails%%/*}
112-
parentGAV=${projectDetails#*/}
108+
projectDetails=$(mvn -N -Dexec.executable='echo' -Dexec.args='${project.version}:${license.licenseName}:${project.parent.groupId}:${project.parent.artifactId}:${project.parent.version}' exec:exec -q)
109+
currentVersion=${projectDetails%%:*}
110+
projectDetails=${projectDetails#*:}
111+
licenseName=${projectDetails%%:*}
112+
parentGAV=${projectDetails#*:}
113113

114114
# -- Sanity checks --
115115

0 commit comments

Comments
 (0)