Improve build pipeline
This commit is contained in:
parent
dc44cbcda6
commit
b5439a0661
49
build.sh
49
build.sh
|
@ -40,13 +40,6 @@ EnableBsdSupport()
|
|||
fi
|
||||
}
|
||||
|
||||
SetExecutableBits()
|
||||
{
|
||||
find . -name "ffprobe" -exec chmod a+x {} \;
|
||||
find . -name "Sonarr" -exec chmod a+x {} \;
|
||||
find . -name "Sonarr.Update" -exec chmod a+x {} \;
|
||||
}
|
||||
|
||||
LintUI()
|
||||
{
|
||||
ProgressStart 'ESLint'
|
||||
|
@ -110,7 +103,11 @@ PackageFiles()
|
|||
mkdir -p $folder
|
||||
cp -r $outputFolder/$framework/$runtime/publish/* $folder
|
||||
cp -r $outputFolder/Sonarr.Update/$framework/$runtime/publish $folder/Sonarr.Update
|
||||
cp -r $outputFolder/UI $folder
|
||||
|
||||
if [ "$FRONTEND" = "YES" ];
|
||||
then
|
||||
cp -r $outputFolder/UI $folder
|
||||
fi
|
||||
|
||||
echo "Adding LICENSE"
|
||||
cp LICENSE.md $folder
|
||||
|
@ -235,7 +232,6 @@ Package()
|
|||
;;
|
||||
osx)
|
||||
PackageMacOS "$framework" "$runtime"
|
||||
PackageMacOSApp "$framework" "$runtime"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
@ -280,21 +276,28 @@ UploadArtifacts()
|
|||
for dir in $artifactsFolder/*
|
||||
do
|
||||
local runtime=$(basename "$dir")
|
||||
local extension="tar.gz"
|
||||
|
||||
if [[ "$runtime" =~ win-|-app ]]; then
|
||||
extension="zip"
|
||||
fi
|
||||
|
||||
echo "##teamcity[publishArtifacts '$artifactsFolder/$runtime/$framework/** => Sonarr.$BRANCH.$BUILD_NUMBER.$runtime.$extension']"
|
||||
echo "##teamcity[publishArtifacts '$artifactsFolder/$runtime/$framework/** => Sonarr.$BRANCH.$SONARR_VERSION.$runtime.zip']"
|
||||
done
|
||||
|
||||
# Debian Package
|
||||
# Debian Package / Windows installer / macOS app
|
||||
echo "##teamcity[publishArtifacts 'distribution/** => distribution.zip']"
|
||||
|
||||
ProgressEnd 'Publishing Artifacts'
|
||||
}
|
||||
|
||||
UploadUIArtifacts()
|
||||
{
|
||||
local framework="$1"
|
||||
|
||||
ProgressStart 'Publishing UI Artifacts'
|
||||
|
||||
# UI folder
|
||||
echo "##teamcity[publishArtifacts '$outputFolder/UI/** => UI.zip']"
|
||||
|
||||
ProgressEnd 'Publishing UI Artifacts'
|
||||
}
|
||||
|
||||
# Use mono or .net depending on OS
|
||||
case "$(uname -s)" in
|
||||
CYGWIN*|MINGW32*|MINGW64*|MSYS*)
|
||||
|
@ -397,12 +400,6 @@ then
|
|||
UploadTestArtifacts "net6.0"
|
||||
fi
|
||||
|
||||
if [ "$FRONTEND" = "YES" ];
|
||||
then
|
||||
YarnInstall
|
||||
RunWebpack
|
||||
fi
|
||||
|
||||
if [ "$LINT" = "YES" ];
|
||||
then
|
||||
if [ -z "$FRONTEND" ];
|
||||
|
@ -413,10 +410,16 @@ then
|
|||
LintUI
|
||||
fi
|
||||
|
||||
if [ "$FRONTEND" = "YES" ];
|
||||
then
|
||||
YarnInstall
|
||||
RunWebpack
|
||||
UploadUIArtifacts
|
||||
fi
|
||||
|
||||
if [ "$PACKAGES" = "YES" ];
|
||||
then
|
||||
UpdateVersionNumber
|
||||
SetExecutableBits
|
||||
|
||||
if [[ -z "$RID" || -z "$FRAMEWORK" ]];
|
||||
then
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
REM SET BUILD_NUMBER=1
|
||||
REM SET SONARR_VERSION=1
|
||||
REM SET BRANCH=develop
|
||||
echo ##teamcity[progressStart 'Building setup file']
|
||||
inno\ISCC.exe sonarr.iss
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
#define ForumsURL "https://forums.sonarr.tv/"
|
||||
#define AppExeName "Sonarr.exe"
|
||||
#define BuildNumber "3.0"
|
||||
#define BuildNumber GetEnv('BUILD_NUMBER')
|
||||
#define BuildNumber GetEnv('SONARR_VERSION')
|
||||
#define BranchName GetEnv('BRANCH')
|
||||
#define Framework GetEnv('FRAMEWORK')
|
||||
#define Runtime GetEnv('RUNTIME')
|
||||
|
||||
[Setup]
|
||||
; NOTE: The value of AppId uniquely identifies this application.
|
||||
; NOTE: The value of AppId uniquely identifies this appl ication.
|
||||
; Do not use the same AppId value in installers for other applications.
|
||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||
AppId={{56C1065D-3523-4025-B76D-6F73F67F7F71}
|
||||
|
|
Loading…
Reference in New Issue