Commit 047b55d9 by 据说甜蜜呢

添加文件

parent 2b14a54e
#!/bin/bash
set -e
function GetServiceName()
{
declare servicePrefix=${1}
declare serviceName=$(ls ./src/services/${servicePrefix}|head -n 1|xargs -d '/' echo)
$2="${serviceName}"
}
function GetAppName()
{
declare appName=($(grep -oP '(?<=AppName>)[^<]+' "devops/app.props"))
$1="${appName}"
}
function GetCiCdSettings()
{
declare allPublishable=($(grep -oP '(?<=AllPublishable>)[^<]+' "/tmp/cicd.props"))
declare noPublishable=($(grep -oP '(?<=NoPublishable>)[^<]+' "/tmp/cicd.props"))
}
function GetMajor()
{
declare major=($(grep -oP '(?<=VersionMajor>)[^<]+' "devops/version.props"))
$1=${major}
}
function GetVersion()
{
declare major=($(grep -oP '(?<=VersionMajor>)[^<]+' "devops/version.props"))
declare minor=($(grep -oP '(?<=VersionMinor>)[^<]+' "devops/version.props"))
declare patch=($(grep -oP '(?<=VersionPatch>)[^<]+' "devops/version.props"))
declare version=${major}.${minor}.${patch}
$1=${version}
}
function GetImageRegistrySettings()
{
declare host=($(grep -oP '(?<=ImageRegistryHost>)[^<]+' "devops/deploy.props"))
declare username=($(grep -oP '(?<=ImageUserName>)[^<]+' "devops/deploy.props"))
$1=${host}
$2=${username}
}
function GetAccessTokenOf()
{
declare token=($(grep -oP "(?<=${Environment}AccessToken>)[^<]+" "devops/deploy.props"))
$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