From 2967c58a4d53c6cd41e2bb6629d5f0f53ce24eae Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sat, 20 Aug 2022 10:29:51 -0700 Subject: [PATCH] Set execution bits when packaging builds --- build.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index ed1c791eb..8012da492 100755 --- a/build.sh +++ b/build.sh @@ -21,11 +21,11 @@ ProgressEnd() UpdateVersionNumber() { - if [ "$SONARRVERSION" != "" ]; then - echo "Updating Version Info" - sed -i'' -e "s/[0-9.*]\+<\/AssemblyVersion>/$SONARRVERSION<\/AssemblyVersion>/g" src/Directory.Build.props + if [ "$SONARR_VERSION" != "" ]; then + echo "Updating version info to: $SONARR_VERSION" + sed -i'' -e "s/[0-9.*]\+<\/AssemblyVersion>/$SONARR_VERSION<\/AssemblyVersion>/g" src/Directory.Build.props sed -i'' -e "s/[\$()A-Za-z-]\+<\/AssemblyConfiguration>/${BUILD_SOURCEBRANCHNAME}<\/AssemblyConfiguration>/g" src/Directory.Build.props - sed -i'' -e "s/10.0.0.0<\/string>/$SONARRVERSION<\/string>/g" distribution/macOS/Sonarr.app/Contents/Info.plist + sed -i'' -e "s/10.0.0.0<\/string>/$SONARR_VERSION<\/string>/g" distribution/macOS/Sonarr.app/Contents/Info.plist fi } @@ -40,6 +40,13 @@ 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' @@ -364,11 +371,14 @@ set -- "${POSITIONAL[@]}" # restore positional parameters if [ "$BACKEND" = "YES" ]; then UpdateVersionNumber + if [ "$ENABLE_BSD" = "YES" ]; then EnableBsdSupport fi + Build + if [[ -z "$RID" || -z "$FRAMEWORK" ]]; then PackageTests "net6.0" "win-x64" @@ -406,6 +416,7 @@ fi if [ "$PACKAGES" = "YES" ]; then UpdateVersionNumber + SetExecutableBits if [[ -z "$RID" || -z "$FRAMEWORK" ]]; then