提交 7b69fe5b 编写于 作者: J Jesse Glick

[INFRA-1032] ${user.name} might contain metacharacters.

上级 78a42d5a
......@@ -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
}
}
}
......
......@@ -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>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册