2 Star 0 Fork 0

mirrors_mulesoft/mule-artifact-declaration

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
update_deps_versions.sh 884 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
set -o nounset
updatePropertiesVersion() {
VERSION_TO_PROPERTY="$1"
POM_PROPERTY_PATH="$2"
# PROPERTIES argument should be passed as a literal "arrayName[@]" without $ because here using the ! it is double expanded
# to obtiain the values and declare again the array.
PROPERTIES=("${!3}")
echo "Updating deps in pom: $POM_PROPERTY_PATH"
for PROPERTY_NAME in "${PROPERTIES[@]}"
do
perl -0777 -i -pe "s/(<properties>.*<$PROPERTY_NAME)(.*)(\/$PROPERTY_NAME>.*<\/properties>)/\${1}>$VERSION_TO_PROPERTY<\${3}/s" "$POM_PROPERTY_PATH"
echo "- Updating property $PROPERTY_NAME version to $VERSION_TO_PROPERTY"
done
}
VERSION_TO=$1
# Properties with releaseVersion in the root pom.xml
propertiesDeps=("muleModuleMavenPluginVersion"
"metadataModelApiVersion")
updatePropertiesVersion "$VERSION_TO" pom.xml propertiesDeps[@]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_mulesoft/mule-artifact-declaration.git
git@gitee.com:mirrors_mulesoft/mule-artifact-declaration.git
mirrors_mulesoft
mule-artifact-declaration
mule-artifact-declaration
master

搜索帮助