Lidarr/build.sh

444 lines
10 KiB
Bash
Raw Normal View History

#! /usr/bin/env bash
set -e
outputFolder='_output'
testPackageFolder='_tests'
artifactsFolder="_artifacts";
2015-07-04 12:10:11 +00:00
ProgressStart()
{
echo "Start '$1'"
}
ProgressEnd()
{
echo "Finish '$1'"
}
2019-08-22 21:28:51 +00:00
UpdateVersionNumber()
{
if [ "$LIDARRVERSION" != "" ]; then
echo "Updating Version Info"
sed -i'' -e "s/<AssemblyVersion>[0-9.*]\+<\/AssemblyVersion>/<AssemblyVersion>$LIDARRVERSION<\/AssemblyVersion>/g" src/Directory.Build.props
sed -i'' -e "s/<AssemblyConfiguration>[\$()A-Za-z-]\+<\/AssemblyConfiguration>/<AssemblyConfiguration>${BUILD_SOURCEBRANCHNAME}<\/AssemblyConfiguration>/g" src/Directory.Build.props
sed -i'' -e "s/<string>10.0.0.0<\/string>/<string>$LIDARRVERSION<\/string>/g" macOS/Lidarr.app/Contents/Info.plist
2019-08-22 21:28:51 +00:00
fi
}
2022-04-28 20:23:02 +00:00
EnableExtraPlatformsInSDK()
{
2022-04-28 20:23:02 +00:00
SDK_PATH=$(dotnet --list-sdks | grep -P '6\.\d\.\d+' | head -1 | sed 's/\(6\.[0-9]*\.[0-9]*\).*\[\(.*\)\]/\2\/\1/g')
BUNDLEDVERSIONS="${SDK_PATH}/Microsoft.NETCoreSdk.BundledVersions.props"
if grep -q freebsd-x64 $BUNDLEDVERSIONS; then
echo "Extra platforms already enabled"
else
echo "Enabling extra platform support"
sed -i.ORI 's/osx-x64/osx-x64;freebsd-x64;linux-x86/' $BUNDLEDVERSIONS
fi
}
2022-04-28 20:23:02 +00:00
EnableExtraPlatforms()
{
if grep -qv freebsd-x64 src/Directory.Build.props; then
2022-04-28 20:23:02 +00:00
sed -i'' -e "s^<RuntimeIdentifiers>\(.*\)</RuntimeIdentifiers>^<RuntimeIdentifiers>\1;freebsd-x64;linux-x86</RuntimeIdentifiers>^g" src/Directory.Build.props
fi
}
2017-10-07 06:21:06 +00:00
LintUI()
{
ProgressStart 'ESLint'
yarn lint
2017-10-07 06:21:06 +00:00
ProgressEnd 'ESLint'
ProgressStart 'Stylelint'
if [ "$os" = "windows" ]; then
yarn stylelint-windows
Whole album matching and fingerprinting (#592) * Cache result of GetAllArtists * Fixed: Manual import not respecting album import notifications * Fixed: partial album imports stay in queue, prompting manual import * Fixed: Allow release if tracks are missing * Fixed: Be tolerant of missing/extra "The" at start of artist name * Improve manual import UI * Omit video tracks from DB entirely * Revert "faster test packaging in build.sh" This reverts commit 2723e2a7b86bcbff9051fd2aced07dd807b4bcb7. -u and -T are not supported on macOS * Fix tests on linux and macOS * Actually lint on linux On linux yarn runs scripts with sh not bash so ** doesn't recursively glob * Match whole albums * Option to disable fingerprinting * Rip out MediaInfo * Don't split up things that have the same album selected in manual import * Try to speed up IndentificationService * More speedups * Some fixes and increase power of recording id * Fix NRE when no tags * Fix NRE when some (but not all) files in a directory have missing tags * Bump taglib, tidy up tag parsing * Add a health check * Remove media info setting * Tags -> audioTags * Add some tests where tags are null * Rename history events * Add missing method to interface * Reinstate MediaInfo tags and update info with artist scan Also adds migration to remove old format media info * This file no longer exists * Don't penalise year if missing from tags * Formatting improvements * Use correct system newline * Switch to the netstandard2.0 library to support net 461 * TagLib.File is IDisposable so should be in a using * Improve filename matching and add tests * Neater logging of parsed tags * Fix disk scan tests for new media info update * Fix quality detection source * Fix Inexact Artist/Album match * Add button to clear track mapping * Fix warning * Pacify eslint * Use \ not / * Fix UI updates * Fix media covers Prevent localizing URL propaging back to the metadata object * Reduce database overhead broadcasting UI updates * Relax timings a bit to make test pass * Remove irrelevant tests * Test framework for identification service * Fix PreferMissingToBadMatch test case * Make fingerprinting more robust * More logging * Penalize unknown media format and country * Prefer USA to UK * Allow Data CD * Fix exception if fingerprinting fails for all files * Fix tests * Fix NRE * Allow apostrophes and remove accents in filename aggregation * Address codacy issues * Cope with old versions of fpcalc and suggest upgrade * fpcalc health check passes if fingerprinting disabled * Get the Artist meta with the artist * Fix the mapper so that lazy loaded lists will be populated on Join And therefore we can join TrackFiles on Tracks by default and avoid an extra query * Rename subtitle -> lyric * Tidy up MediaInfoFormatter
2019-02-16 14:49:24 +00:00
else
yarn stylelint-linux
Whole album matching and fingerprinting (#592) * Cache result of GetAllArtists * Fixed: Manual import not respecting album import notifications * Fixed: partial album imports stay in queue, prompting manual import * Fixed: Allow release if tracks are missing * Fixed: Be tolerant of missing/extra "The" at start of artist name * Improve manual import UI * Omit video tracks from DB entirely * Revert "faster test packaging in build.sh" This reverts commit 2723e2a7b86bcbff9051fd2aced07dd807b4bcb7. -u and -T are not supported on macOS * Fix tests on linux and macOS * Actually lint on linux On linux yarn runs scripts with sh not bash so ** doesn't recursively glob * Match whole albums * Option to disable fingerprinting * Rip out MediaInfo * Don't split up things that have the same album selected in manual import * Try to speed up IndentificationService * More speedups * Some fixes and increase power of recording id * Fix NRE when no tags * Fix NRE when some (but not all) files in a directory have missing tags * Bump taglib, tidy up tag parsing * Add a health check * Remove media info setting * Tags -> audioTags * Add some tests where tags are null * Rename history events * Add missing method to interface * Reinstate MediaInfo tags and update info with artist scan Also adds migration to remove old format media info * This file no longer exists * Don't penalise year if missing from tags * Formatting improvements * Use correct system newline * Switch to the netstandard2.0 library to support net 461 * TagLib.File is IDisposable so should be in a using * Improve filename matching and add tests * Neater logging of parsed tags * Fix disk scan tests for new media info update * Fix quality detection source * Fix Inexact Artist/Album match * Add button to clear track mapping * Fix warning * Pacify eslint * Use \ not / * Fix UI updates * Fix media covers Prevent localizing URL propaging back to the metadata object * Reduce database overhead broadcasting UI updates * Relax timings a bit to make test pass * Remove irrelevant tests * Test framework for identification service * Fix PreferMissingToBadMatch test case * Make fingerprinting more robust * More logging * Penalize unknown media format and country * Prefer USA to UK * Allow Data CD * Fix exception if fingerprinting fails for all files * Fix tests * Fix NRE * Allow apostrophes and remove accents in filename aggregation * Address codacy issues * Cope with old versions of fpcalc and suggest upgrade * fpcalc health check passes if fingerprinting disabled * Get the Artist meta with the artist * Fix the mapper so that lazy loaded lists will be populated on Join And therefore we can join TrackFiles on Tracks by default and avoid an extra query * Rename subtitle -> lyric * Tidy up MediaInfoFormatter
2019-02-16 14:49:24 +00:00
fi
2017-10-07 06:21:06 +00:00
ProgressEnd 'Stylelint'
}
2015-07-04 12:10:11 +00:00
Build()
{
ProgressStart 'Build'
2015-07-04 12:10:11 +00:00
rm -rf $outputFolder
2019-08-22 21:28:51 +00:00
rm -rf $testPackageFolder
2015-07-04 12:10:11 +00:00
2020-01-02 02:28:18 +00:00
slnFile=src/Lidarr.sln
if [ $os = "windows" ]; then
2020-01-02 02:28:18 +00:00
platform=Windows
2015-07-04 12:10:11 +00:00
else
2020-01-02 02:28:18 +00:00
platform=Posix
2015-07-04 12:10:11 +00:00
fi
2016-01-16 06:06:33 +00:00
dotnet clean $slnFile -c Debug
dotnet clean $slnFile -c Release
if [[ -z "$RID" || -z "$FRAMEWORK" ]];
then
2020-01-02 02:28:18 +00:00
dotnet msbuild -restore $slnFile -p:Configuration=Release -p:Platform=$platform -t:PublishAllRids
else
2020-01-02 02:28:18 +00:00
dotnet msbuild -restore $slnFile -p:Configuration=Release -p:Platform=$platform -p:RuntimeIdentifiers=$RID -t:PublishAllRids
fi
ProgressEnd 'Build'
2015-07-04 12:10:11 +00:00
}
2019-09-12 20:35:22 +00:00
YarnInstall()
2015-07-04 12:10:11 +00:00
{
ProgressStart 'yarn install'
2020-07-04 04:01:47 +00:00
yarn install --frozen-lockfile --network-timeout 120000
ProgressEnd 'yarn install'
2019-09-12 20:35:22 +00:00
}
2015-07-04 12:10:11 +00:00
RunWebpack()
2019-09-12 20:35:22 +00:00
{
ProgressStart 'Running webpack'
yarn run build --env production
ProgressEnd 'Running webpack'
2015-07-04 12:10:11 +00:00
}
PackageFiles()
2015-07-04 12:10:11 +00:00
{
local folder="$1"
local framework="$2"
local runtime="$3"
rm -rf $folder
mkdir -p $folder
cp -r $outputFolder/$framework/$runtime/publish/* $folder
cp -r $outputFolder/Lidarr.Update/$framework/$runtime/publish $folder/Lidarr.Update
cp -r $outputFolder/UI $folder
echo "Adding LICENSE"
cp LICENSE.md $folder
}
2019-09-12 20:35:22 +00:00
PackageLinux()
{
local framework="$1"
local runtime="$2"
ProgressStart "Creating $runtime Package for $framework"
2015-07-04 12:10:11 +00:00
local folder=$artifactsFolder/$runtime/$framework/Lidarr
2015-07-04 12:10:11 +00:00
PackageFiles "$folder" "$framework" "$runtime"
echo "Removing Service helpers"
rm -f $folder/ServiceUninstall.*
rm -f $folder/ServiceInstall.*
2015-07-04 12:10:11 +00:00
echo "Removing Lidarr.Windows"
rm $folder/Lidarr.Windows.*
2015-07-04 12:10:11 +00:00
echo "Adding Lidarr.Mono to UpdatePackage"
cp $folder/Lidarr.Mono.* $folder/Lidarr.Update
2021-12-24 17:40:37 +00:00
if [ "$framework" = "net6.0" ]; then
cp $folder/Mono.Posix.NETStandard.* $folder/Lidarr.Update
cp $folder/libMonoPosixHelper.* $folder/Lidarr.Update
fi
2016-01-16 06:06:33 +00:00
ProgressEnd "Creating $runtime Package for $framework"
2015-07-04 12:10:11 +00:00
}
PackageMacOS()
2015-07-04 12:10:11 +00:00
{
local framework="$1"
local runtime="$2"
ProgressStart "Creating $runtime Package for $framework"
local folder=$artifactsFolder/$runtime/$framework/Lidarr
PackageFiles "$folder" "$framework" "$runtime"
echo "Removing Service helpers"
rm -f $folder/ServiceUninstall.*
rm -f $folder/ServiceInstall.*
echo "Removing Lidarr.Windows"
rm $folder/Lidarr.Windows.*
2015-07-04 12:10:11 +00:00
echo "Adding Lidarr.Mono to UpdatePackage"
cp $folder/Lidarr.Mono.* $folder/Lidarr.Update
2021-12-24 17:40:37 +00:00
if [ "$framework" = "net6.0" ]; then
cp $folder/Mono.Posix.NETStandard.* $folder/Lidarr.Update
cp $folder/libMonoPosixHelper.* $folder/Lidarr.Update
fi
2015-07-04 12:10:11 +00:00
ProgressEnd 'Creating MacOS Package'
2015-07-04 12:10:11 +00:00
}
PackageMacOSApp()
2015-07-04 12:10:11 +00:00
{
local framework="$1"
local runtime="$2"
ProgressStart "Creating $runtime App Package for $framework"
2015-07-04 12:10:11 +00:00
local folder=$artifactsFolder/$runtime-app/$framework
rm -rf $folder
mkdir -p $folder
cp -r macOS/Lidarr.app $folder
mkdir -p $folder/Lidarr.app/Contents/MacOS
echo "Copying Binaries"
cp -r $artifactsFolder/$runtime/$framework/Lidarr/* $folder/Lidarr.app/Contents/MacOS
echo "Removing Update Folder"
rm -r $folder/Lidarr.app/Contents/MacOS/Lidarr.Update
ProgressEnd 'Creating macOS App Package'
2015-07-04 12:10:11 +00:00
}
PackageWindows()
2015-07-04 12:10:11 +00:00
{
local framework="$1"
2020-11-11 03:56:47 +00:00
local runtime="$2"
2022-04-14 02:08:14 +00:00
ProgressStart "Creating Windows Package for $framework"
2020-11-11 03:56:47 +00:00
local folder=$artifactsFolder/$runtime/$framework/Lidarr
2020-11-11 03:56:47 +00:00
PackageFiles "$folder" "$framework" "$runtime"
cp -r $outputFolder/$framework-windows/$runtime/publish/* $folder
echo "Removing Lidarr.Mono"
rm -f $folder/Lidarr.Mono.*
rm -f $folder/Mono.Posix.NETStandard.*
rm -f $folder/libMonoPosixHelper.*
2015-07-04 12:10:11 +00:00
echo "Adding Lidarr.Windows to UpdatePackage"
cp $folder/Lidarr.Windows.* $folder/Lidarr.Update
ProgressEnd "Creating $runtime Package for $framework"
2015-07-04 12:10:11 +00:00
}
Package()
{
local framework="$1"
local runtime="$2"
local SPLIT
IFS='-' read -ra SPLIT <<< "$runtime"
case "${SPLIT[0]}" in
linux|freebsd*)
PackageLinux "$framework" "$runtime"
;;
win)
2020-11-11 03:56:47 +00:00
PackageWindows "$framework" "$runtime"
;;
osx)
PackageMacOS "$framework" "$runtime"
PackageMacOSApp "$framework" "$runtime"
;;
esac
}
2022-04-14 02:08:14 +00:00
BuildInstaller()
{
local framework="$1"
local runtime="$2"
./_inno/ISCC.exe setup/lidarr.iss "//DFramework=$framework" "//DRuntime=$runtime"
}
InstallInno()
{
ProgressStart "Installing portable Inno Setup"
rm -rf _inno
curl -s --output innosetup.exe "https://files.jrsoftware.org/is/6/innosetup-${INNOVERSION:-6.2.0}.exe"
mkdir _inno
./innosetup.exe //portable=1 //silent //currentuser //dir=.\\_inno
rm innosetup.exe
ProgressEnd "Installed portable Inno Setup"
}
RemoveInno()
{
rm -rf _inno
}
PackageTests()
{
local framework="$1"
local runtime="$2"
cp test.sh "$testPackageFolder/$framework/$runtime/publish"
rm -f $testPackageFolder/$framework/$runtime/*.log.config
ProgressEnd 'Creating Test Package'
}
2015-07-04 12:10:11 +00:00
# Use mono or .net depending on OS
case "$(uname -s)" in
CYGWIN*|MINGW32*|MINGW64*|MSYS*)
# on windows, use dotnet
os="windows"
2015-07-04 12:10:11 +00:00
;;
*)
# otherwise use mono
os="posix"
2015-07-04 12:10:11 +00:00
;;
esac
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
POSITIONAL=()
2019-09-12 20:35:22 +00:00
if [ $# -eq 0 ]; then
echo "No arguments provided, building everything"
BACKEND=YES
FRONTEND=YES
PACKAGES=YES
2022-04-14 02:08:14 +00:00
INSTALLER=NO
2019-09-12 20:35:22 +00:00
LINT=YES
2022-04-28 20:23:02 +00:00
ENABLE_EXTRA_PLATFORMS=NO
ENABLE_EXTRA_PLATFORMS_IN_SDK=NO
2019-09-12 20:35:22 +00:00
fi
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
2019-09-12 20:35:22 +00:00
--backend)
BACKEND=YES
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
shift # past argument
;;
2022-04-28 20:23:02 +00:00
--enable-bsd|--enable-extra-platforms)
ENABLE_EXTRA_PLATFORMS=YES
shift # past argument
;;
--enable-extra-platforms-in-sdk)
ENABLE_EXTRA_PLATFORMS_IN_SDK=YES
shift # past argument
;;
-r|--runtime)
RID="$2"
shift # past argument
shift # past value
;;
-f|--framework)
FRAMEWORK="$2"
shift # past argument
shift # past value
;;
2019-09-12 20:35:22 +00:00
--frontend)
FRONTEND=YES
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
shift # past argument
;;
2019-09-12 20:35:22 +00:00
--packages)
PACKAGES=YES
shift # past argument
;;
2022-04-14 02:08:14 +00:00
--installer)
INSTALLER=YES
shift # past argument
;;
2019-09-12 20:35:22 +00:00
--lint)
LINT=YES
shift # past argument
;;
--all)
BACKEND=YES
FRONTEND=YES
PACKAGES=YES
LINT=YES
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
shift # past argument
;;
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
2022-04-28 20:23:02 +00:00
if [ "$ENABLE_EXTRA_PLATFORMS_IN_SDK" = "YES" ];
then
EnableExtraPlatformsInSDK
fi
if [ "$BACKEND" = "YES" ];
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
then
2019-08-22 21:28:51 +00:00
UpdateVersionNumber
2022-04-28 20:23:02 +00:00
if [ "$ENABLE_EXTRA_PLATFORMS" = "YES" ];
then
2022-04-28 20:23:02 +00:00
EnableExtraPlatforms
fi
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
Build
if [[ -z "$RID" || -z "$FRAMEWORK" ]];
then
2021-12-24 17:40:37 +00:00
PackageTests "net6.0" "win-x64"
PackageTests "net6.0" "win-x86"
PackageTests "net6.0" "linux-x64"
PackageTests "net6.0" "linux-musl-x64"
PackageTests "net6.0" "osx-x64"
2022-04-28 20:23:02 +00:00
if [ "$ENABLE_EXTRA_PLATFORMS" = "YES" ];
then
2021-12-24 17:40:37 +00:00
PackageTests "net6.0" "freebsd-x64"
2022-04-28 20:23:02 +00:00
PackageTests "net6.0" "linux-x86"
fi
else
PackageTests "$FRAMEWORK" "$RID"
fi
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
fi
if [ "$FRONTEND" = "YES" ];
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
then
2019-09-12 20:35:22 +00:00
YarnInstall
RunWebpack
2019-09-12 20:35:22 +00:00
fi
if [ "$LINT" = "YES" ];
2019-09-12 20:35:22 +00:00
then
if [ -z "$FRONTEND" ];
then
YarnInstall
fi
LintUI
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
fi
if [ "$PACKAGES" = "YES" ];
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
then
UpdateVersionNumber
if [[ -z "$RID" || -z "$FRAMEWORK" ]];
then
2021-12-24 17:40:37 +00:00
Package "net6.0" "win-x64"
Package "net6.0" "win-x86"
Package "net6.0" "linux-x64"
Package "net6.0" "linux-musl-x64"
Package "net6.0" "linux-arm64"
Package "net6.0" "linux-musl-arm64"
Package "net6.0" "linux-arm"
2021-12-30 22:31:09 +00:00
Package "net6.0" "linux-musl-arm"
2021-12-24 17:40:37 +00:00
Package "net6.0" "osx-x64"
Package "net6.0" "osx-arm64"
2022-04-28 20:23:02 +00:00
if [ "$ENABLE_EXTRA_PLATFORMS" = "YES" ];
then
2021-12-24 17:40:37 +00:00
Package "net6.0" "freebsd-x64"
2022-04-28 20:23:02 +00:00
Package "net6.0" "linux-x86"
fi
else
Package "$FRAMEWORK" "$RID"
fi
New: Set up CI with Azure Pipelines (#897) * Set up CI with Azure Pipelines [skip ci] * Remove Travis, Build Multiple Environments * Change Task Type to Bash * Checkout submodules * Remove Appveyor Tests, Add Azure Tests * Oops Forget Steps * bad name * test script fixes * add tests to build job * fixup tests * name test runs * fpcalc and artifacts * Try to fix installer * Publish separately * Try publish * Another go at artifacts * Tidy up * Add sentry, assembly info patching and bump version * Only patch one AssemblyInfo; set node version 10 * Try pipeline artifacts again * Tidy up - pipeline artifact seems to be way forward * Fix installer publish * first go at test job seperation * job names and depends/consitions for tests * pusblish single file test artifact * pipeline artifact for test * blitz the pattern filter * windows test jobs * mac tests, checkout on test jobs * try to download build artifact to test job * download and extract artifact * Set LD_LIBRARY_PATH and print some sqlite debug info on mac tests * fixup! tests * integration test fixes * fixup! integration test fixes * fixup! integration test fixes * more fixup * use bash cp * test fixups * mkdir before copy * linux works! add osx integration tests * im tooo tired * coverage attempt * coverage seperate stage * windows paths for integration test * switch coverage to windows where opencover actually works * fix test script * one last go * Simplify installer, try to fix name * Try to parallelize backend and frontend build * Try adding a matrix * Try matrix jobs not stages * Try to fix package step * Remove opencover install * Try to fix tests * coverage fixes * revert build.sh changes * triggers so we don't double build * Publish coverage package so we can debug * try coverage no build, output artifact * use the full pipeline workspace from build job * fix automation tests for new ui * Assorted fix attempts * Another go * MacOS debug * Tidy up, try to fix mac * Fix mac fpcalc, add mac integration tests * Add cross platform automation tests * Fix packages * Try to fix Automation tests * Don't wait on the installer to create standard packages * Fixes * delete logentries reference * run automation tests in headless mode * try install firefox mac * Revert "try install firefox mac" This reverts commit 4684bb19018747cb00407e1d8df64391f44f5183. * test sonarcloud prepare outputs * basic analyze and upload * don't limit fetch depth on analyze * manual scanner do front and backend? * full analyize with tests, coverage * should depend on tests, coverage * no need for condition on coverage * Fix up build numbering * Try to fix sonar * Separate coverage calculation and publication * Try to fix coverage upload
2019-08-13 17:15:59 +00:00
fi
2022-04-14 02:08:14 +00:00
if [ "$INSTALLER" = "YES" ];
then
InstallInno
BuildInstaller "net6.0" "win-x64"
BuildInstaller "net6.0" "win-x86"
RemoveInno
fi