diff --git a/.gitignore b/.gitignore index 6e272c56c..48583b0bc 100644 --- a/.gitignore +++ b/.gitignore @@ -130,6 +130,7 @@ output/* #Packages Radarr_*/ Radarr_*.zip +Radarr_*.gz #OS X metadata files ._* diff --git a/7za.dll b/7za.dll new file mode 100644 index 000000000..f2657b610 Binary files /dev/null and b/7za.dll differ diff --git a/7za.exe b/7za.exe new file mode 100644 index 000000000..dd6cc759b Binary files /dev/null and b/7za.exe differ diff --git a/7zxa.dll b/7zxa.dll new file mode 100644 index 000000000..21ec79dc2 Binary files /dev/null and b/7zxa.dll differ diff --git a/package.sh b/package.sh index b754a796d..28736e964 100644 --- a/package.sh +++ b/package.sh @@ -4,6 +4,18 @@ if [ $# -eq 0 ]; then fi fi +# Use mono or .net depending on OS +case "$(uname -s)" in + CYGWIN*|MINGW32*|MINGW64*|MSYS*) + # on windows, use dotnet + runtime="dotnet" + ;; + *) + # otherwise use mono + runtime="mono" + ;; +esac + if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then VERSION="`date +%H:%M:%S`" YEAR="`date +%Y`" @@ -26,10 +38,15 @@ cp -r $outputFolder/ Radarr_Windows_$VERSION cp -r $outputFolderMono/ Radarr_Mono_$VERSION cp -r $outputFolderOsxApp/ Radarr_OSX_$VERSION +if [ $runtime = "dotnet" ] ; then + ./7za.exe a Radarr_Windows_$VERSION.zip Radarr_Windows_$VERSION + ./7za.exe a -ttar -so Radarr_Mono_$VERSION.tar Radarr_Mono_$VERSION | ./7za.exe a -si Radarr_Mono_$VERSION.tar.gz + ./7za.exe a -ttar -so Radarr_OSX_$VERSION.tar Radarr_OSX_$VERSION | ./7za.exe a -si Radarr_OSX_$VERSION.tar.gz +else zip -r Radarr_Windows_$VERSION.zip Radarr_Windows_$VERSION >& /dev/null zip -r Radarr_Mono_$VERSION.zip Radarr_Mono_$VERSION >& /dev/null zip -r Radarr_OSX_$VERSION.zip Radarr_OSX_$VERSION >& /dev/null - +fi ftp -n ftp.leonardogalli.ch << END_SCRIPT passive quote USER $FTP_USER