mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-27 02:43:57 +02:00
Replace Major.Minor.Revision in the TC provided BuildNumber with the packageVersion.
This commit is contained in:
parent
7f5c1b0d5f
commit
6345d0e73b
14
build.sh
14
build.sh
@ -14,6 +14,8 @@ updateFolderMono=$outputFolderLinux/Sonarr.Update
|
||||
nuget='tools/nuget/nuget.exe';
|
||||
vswhere='tools/vswhere/vswhere.exe';
|
||||
|
||||
. ./version.sh
|
||||
|
||||
CheckExitCode()
|
||||
{
|
||||
"$@"
|
||||
@ -37,6 +39,17 @@ ProgressEnd()
|
||||
echo "##teamcity[blockClosed name='$1']"
|
||||
}
|
||||
|
||||
UpdateVersionNumber()
|
||||
{
|
||||
if [ "$BUILD_NUMBER" != "" ]; then
|
||||
verMajorMinorRevision=`echo "$buildVersion" | cut -d. -f1,2,3`
|
||||
verBuild=`echo "$BUILD_NUMBER" | cut -d. -f4`
|
||||
BUILD_NUMBER=$verMajorMinorRevision.$verBuild
|
||||
echo "##teamcity[buildNumber '$BUILD_NUMBER']"
|
||||
sed -i "s/^[[]assembly: Assembly\(File\|Informational\)\?Version[(]\"[0-9.*]\+\"[)]/[assembly: Assembly\1Version(\"$BUILD_NUMBER\")/g" ./src/**/Properties/AssemblyInfo.cs ./src/Common/CommonVersionInfo.cs
|
||||
fi
|
||||
}
|
||||
|
||||
CleanFolder()
|
||||
{
|
||||
local path=$1
|
||||
@ -321,6 +334,7 @@ case "$(uname -s)" in
|
||||
;;
|
||||
esac
|
||||
|
||||
UpdateVersionNumber
|
||||
Build
|
||||
RunGulp
|
||||
PackageMono
|
||||
|
8
version.sh
Normal file
8
version.sh
Normal file
@ -0,0 +1,8 @@
|
||||
#! /bin/bash
|
||||
|
||||
# Increment packageVersion when package scripts change
|
||||
packageVersion='3.0.1'
|
||||
|
||||
# For now we keep the build version and package version the same
|
||||
buildVersion=$packageVersion
|
||||
|
Loading…
Reference in New Issue
Block a user