1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-03-05 13:21:25 -05:00

New: .NET 5 support for FreeBSD 11+

This commit is contained in:
ta264
2021-02-09 21:09:13 +00:00
parent 0fcad533eb
commit 108609d064
16 changed files with 222 additions and 41 deletions

View File

@@ -1,4 +1,4 @@
#! /bin/bash
#! /usr/bin/env bash
set -e
outputFolder='_output'
@@ -25,6 +25,18 @@ UpdateVersionNumber()
fi
}
EnableBsdSupport()
{
#todo enable sdk with
#SDK_PATH=$(dotnet --list-sdks | grep -P '5\.\d\.\d+' | head -1 | sed 's/\(5\.[0-9]*\.[0-9]*\).*\[\(.*\)\]/\2\/\1/g')
# BUNDLED_VERSIONS="${SDK_PATH}/Microsoft.NETCoreSdk.BundledVersions.props"
if grep -qv freebsd-x64 src/Directory.Build.props; then
sed -i'' -e "s^<RuntimeIdentifiers>\(.*\)</RuntimeIdentifiers>^<RuntimeIdentifiers>\1;freebsd-x64</RuntimeIdentifiers>^g" src/Directory.Build.props
sed -i'' -e "s^<ExcludedRuntimeFrameworkPairs>\(.*\)</ExcludedRuntimeFrameworkPairs>^<ExcludedRuntimeFrameworkPairs>\1;freebsd-x64:net472</ExcludedRuntimeFrameworkPairs>^g" src/Directory.Build.props
fi
}
LintUI()
{
ProgressStart 'ESLint'
@@ -212,7 +224,7 @@ Package()
IFS='-' read -ra SPLIT <<< "$runtime"
case "${SPLIT[0]}" in
linux)
linux|freebsd*)
PackageLinux "$framework" "$runtime"
;;
win)
@@ -257,6 +269,7 @@ if [ $# -eq 0 ]; then
FRONTEND=YES
PACKAGES=YES
LINT=YES
ENABLE_BSD=NO
fi
while [[ $# -gt 0 ]]
@@ -268,6 +281,10 @@ case $key in
BACKEND=YES
shift # past argument
;;
--enable-bsd)
ENABLE_BSD=YES
shift # past argument
;;
-r|--runtime)
RID="$2"
shift # past argument
@@ -308,6 +325,10 @@ set -- "${POSITIONAL[@]}" # restore positional parameters
if [ "$BACKEND" = "YES" ];
then
UpdateVersionNumber
if [ "$ENABLE_BSD" = "YES" ];
then
EnableBsdSupport
fi
Build
if [[ -z "$RID" || -z "$FRAMEWORK" ]];
then
@@ -317,6 +338,10 @@ then
PackageTests "net5.0" "linux-musl-x64"
PackageTests "net5.0" "osx-x64"
PackageTests "net472" "linux-x64"
if [ "$ENABLE_BSD" = "YES" ];
then
PackageTests "net5.0" "freebsd-x64"
fi
else
PackageTests "$FRAMEWORK" "$RID"
fi
@@ -353,6 +378,10 @@ then
Package "net5.0" "linux-arm"
Package "net5.0" "osx-x64"
Package "net472" "linux-x64"
if [ "$ENABLE_BSD" = "YES" ];
then
Package "net5.0" "freebsd-x64"
fi
else
Package "$FRAMEWORK" "$RID"
fi