Commit 77c4fc89 by 据说甜蜜呢

添加文件

parent 40358c5b
Pipeline #4136 passed with stage
in 16 seconds
#!/bin/bash
set -e
function ToLower()
{
declare input=$1
declare output=($(echo "${input}" | tr 'A-Z' 'a-z'))
eval $2=${output}
}
function GetServices()
{
# eval $1=`ls ./src/Services|xargs -d '/'`
}
function GetServiceCsProjFile()
{
declare prefix=${1}
declare name=${2}
declare csprojFile="./src/Services/${prefix}/${name}/${name}.csproj"
eval $3="${csprojFile}"
}
function GetServiceName()
{
declare prefix=${1}
declare name=($(ls ./src/Services/${prefix}|head -n 1|xargs -d '/' echo))
eval $2="${name}"
}
function GetAppName()
{
declare name=($(grep -oP '(?<=AppName>)[^<]+' "./devops/app.props"))
eval $1="${name}"
}
function GetSolutionName()
{
declare name=($(grep -oP '(?<=SolutionName>)[^<]+' "./devops/app.props"))
eval $1="${name}"
}
function GetImageUserName()
{
declare name=($(grep -oP '(?<=ImageUserName>)[^<]+' "devops/deploy.props"))
eval $1="${name}"
}
function GetCiCdSettings()
{
declare all=($(grep -oP '(?<=AllPublishable>)[^<]+' "/tmp/cicd.props"))
declare no=($(grep -oP '(?<=NoPublishable>)[^<]+' "/tmp/cicd.props"))
eval $1=${all}
eval $2=${no}
}
function GetMajor()
{
declare m=($(grep -oP '(?<=Major>)[^<]+' "./devops/version.props"))
eval $1=${m}
}
function GetVersion()
{
declare major=($(grep -oP '(?<=Major>)[^<]+' "./devops/version.props"))
declare minor=($(grep -oP '(?<=Minor>)[^<]+' "./devops/version.props"))
declare patch=($(grep -oP '(?<=Patch>)[^<]+' "./devops/version.props"))
eval $1="${major}.${minor}.${patch}"
}
function GetImageRegistrySettings()
{
declare host=($(grep -oP '(?<=ImageRegistryHost>)[^<]+' "devops/deploy.props"))
declare username=($(grep -oP '(?<=ImageUserName>)[^<]+' "devops/deploy.props"))
eval $1=${host}
eval $2=${username}
}
function GetAccessTokenOf()
{
declare token=($(grep -oP "(?<=${Environment}AccessToken>)[^<]+" "devops/deploy.props"))
eval $1="${token}"
}
function IsPublishableOf()
{
declare prefix=$0
declare isP=($(grep -oP "(?<=${prefix}Publishable>)[^<]+" "/tmp/cicd.props"))
eval $1=isP
}
\ 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