Commit 246f7514 by 据说甜蜜呢

添加方法DynamicVariableValueOf

parent 6d290dcd
Pipeline #4237 passed with stage
in 21 seconds
......@@ -16,4 +16,12 @@ function Replace()
declare targetExpr=$3
declare output=${input//${sourceExpr}/${targetExpr}}
eval $4=${output}
}
function DynamicVariableValueOf()
{
declare prefix=$1
declare suffix=$2
eval "output=\$$prefix$suffix"
eval $3=${output}
}
\ No newline at end of file
......@@ -2,6 +2,10 @@
set -e
IFS=$'\n\n'
# Import external functions
chmod +x ./devops/PipeLines/Functions.common.sh
source ./devops/PipeLines/Functions.common.sh
function AddHeadConfig()
{
# sync config for later retries, not affected by cross-job.
......@@ -62,7 +66,7 @@ else
for servicePrefix in `ls ./src/Services|xargs -d '/'`
do
# Notes: Hard release[manual control], will not analyz changes.
isPublishable=$(eval echo ${servicePrefix}Publishable)
DynamicVariableValueOf "${servicePrefix}" "Publishable" isPublishable
if [ "${isPublishable}" == "1" ];
then
AddConfig "${servicePrefix}" "${isPublishable}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment