[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 mvnCmd
|
||||||
sh 'test `git status --short | tee /dev/stderr | wc --bytes` -eq 0'
|
sh 'test `git status --short | tee /dev/stderr | wc --bytes` -eq 0'
|
||||||
} else {
|
} else {
|
||||||
bat "$mvnCmd -Duser.name=yay" // INFRA-1032 workaround
|
bat mvnCmd
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
15
pom.xml
15
pom.xml
|
@ -282,6 +282,19 @@ THE SOFTWARE.
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
<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>
|
<id>version-property</id>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>regex-property</goal>
|
<goal>regex-property</goal>
|
||||||
|
@ -290,7 +303,7 @@ THE SOFTWARE.
|
||||||
<name>build.version</name>
|
<name>build.version</name>
|
||||||
<value>${project.version}</value>
|
<value>${project.version}</value>
|
||||||
<regex>-SNAPSHOT</regex>
|
<regex>-SNAPSHOT</regex>
|
||||||
<replacement>-SNAPSHOT (${build.type}-${now}-${user.name})</replacement>
|
<replacement>-SNAPSHOT (${build.type}-${now}-${user.name.escaped})</replacement>
|
||||||
<failIfNoMatch>false</failIfNoMatch>
|
<failIfNoMatch>false</failIfNoMatch>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
|
Loading…
Reference in New Issue