Closed dcleaver closed 5 years ago
In VersionAssemblies, the Prefix for Replacements field cannot end in a space character.
For example, I want to update versionCode in build.gradle which looks like:
versionCode
build.gradle
android { compileSdkVersion 28 defaultConfig { applicationId "com.example" minSdkVersion 21 targetSdkVersion 28 versionCode 1 versionName "1.0" } ...
Custom Regex Replace Pattern: "versionCode 1" Prefix for Replacements: "versionCode " (<-- note space character on end)
"versionCode 1"
"versionCode "
versionCode 1 is replaced with versionCode 2
versionCode 1
versionCode 2
versionCode 1 is replaced with versionCode2
versionCode2
I have tried a number of escape characters, but they just end up being inserted verbatim.
I suspect VSTS fields cannot end in a space character.
Hi @dcleaver you are correct - Azure DevOps will trim off trailing spaces. Have you considered using ReplaceTokens and tokenizing rather than using VersionAssemblies?
In VersionAssemblies, the Prefix for Replacements field cannot end in a space character.
For example, I want to update
versionCode
inbuild.gradle
which looks like:Reproduction Steps
Custom Regex Replace Pattern:
"versionCode 1"
Prefix for Replacements:"versionCode "
(<-- note space character on end)Expected Result
versionCode 1
is replaced withversionCode 2
Actual Result
versionCode 1
is replaced withversionCode2
I have tried a number of escape characters, but they just end up being inserted verbatim.
I suspect VSTS fields cannot end in a space character.