Commit 9e77ac38 by 据说甜蜜呢

添加eval

parent 65d9c9d3
......@@ -6,7 +6,7 @@ function GetServiceName()
{
declare servicePrefix=${1}
declare serviceName=$(ls ./src/services/${servicePrefix}|head -n 1|xargs -d '/' echo)
$2="${serviceName}"
eval $2="${serviceName}"
}
function GetAppName()
......@@ -24,7 +24,7 @@ function GetCiCdSettings()
function GetMajor()
{
declare major=($(grep -oP '(?<=VersionMajor>)[^<]+' "devops/version.props"))
$1=${major}
eval $1=${major}
}
function GetVersion()
......@@ -33,19 +33,19 @@ function GetVersion()
declare minor=($(grep -oP '(?<=VersionMinor>)[^<]+' "devops/version.props"))
declare patch=($(grep -oP '(?<=VersionPatch>)[^<]+' "devops/version.props"))
declare version=${major}.${minor}.${patch}
$1=${version}
eval $1=${version}
}
function GetImageRegistrySettings()
{
declare host=($(grep -oP '(?<=ImageRegistryHost>)[^<]+' "devops/deploy.props"))
declare username=($(grep -oP '(?<=ImageUserName>)[^<]+' "devops/deploy.props"))
$1=${host}
$2=${username}
eval $1=${host}
eval $2=${username}
}
function GetAccessTokenOf()
{
declare token=($(grep -oP "(?<=${Environment}AccessToken>)[^<]+" "devops/deploy.props"))
$1="${token}"
eval $1="${token}"
}
\ No newline at end of file
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