Skip to content

Commit

Permalink
LPD-34604 build: UpdateVersions.groovy: fixes replacement logic if mu…
Browse files Browse the repository at this point in the history
…ltiple conditions match
  • Loading branch information
drewbrokke committed Aug 22, 2024
1 parent c9d5c2a commit 598735a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions build/scripts/src/UpdateVersions.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ new File("../").eachDirRecurse
&& contents.contains( "<version>${oldPomVersion}" ) )
{
println "Found pom: " + pom.getAbsolutePath()
pom.text = contents.replaceAll( "<version>${oldPomVersion}", "<version>${newPomVersion}" )
contents = contents.replaceAll( "<version>${oldPomVersion}", "<version>${newPomVersion}" )
}

if( (contents.contains("-installer-version>${oldVersion}-")) )
{
println "Found pom: " + pom.getAbsolutePath()
pom.text = contents.replaceAll( "-installer-version>${oldVersion}-", "-installer-version>${newVersion}-")
contents = contents.replaceAll( "-installer-version>${oldVersion}-", "-installer-version>${newVersion}-")
}

pom.text = contents
}
}

0 comments on commit 598735a

Please sign in to comment.