[INFRA-1032] ${user.name} might contain metacharacters.
This commit is contained in:
parent
78a42d5a4a
commit
7b69fe5be6
|
@ -44,7 +44,7 @@ for(i = 0; i < buildTypes.size(); i++) {
|
|||
sh mvnCmd
|
||||
sh 'test `git status --short | tee /dev/stderr | wc --bytes` -eq 0'
|
||||
} else {
|
||||
bat "$mvnCmd -Duser.name=yay" // INFRA-1032 workaround
|
||||
bat mvnCmd
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
15
pom.xml
15
pom.xml
|
@ -282,6 +282,19 @@ THE SOFTWARE.
|
|||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>user.name</id>
|
||||
<goals>
|
||||
<goal>regex-property</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<name>user.name.escaped</name>
|
||||
<value>${user.name}</value>
|
||||
<regex>([$\\])</regex>
|
||||
<replacement>\\$1</replacement>
|
||||
<failIfNoMatch>false</failIfNoMatch>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>version-property</id>
|
||||
<goals>
|
||||
<goal>regex-property</goal>
|
||||
|
@ -290,7 +303,7 @@ THE SOFTWARE.
|
|||
<name>build.version</name>
|
||||
<value>${project.version}</value>
|
||||
<regex>-SNAPSHOT</regex>
|
||||
<replacement>-SNAPSHOT (${build.type}-${now}-${user.name})</replacement>
|
||||
<replacement>-SNAPSHOT (${build.type}-${now}-${user.name.escaped})</replacement>
|
||||
<failIfNoMatch>false</failIfNoMatch>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
|
Loading…
Reference in New Issue