From 5abb9de26c6091840235d8c27aff4611312d2f5b Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 4 Dec 2015 19:09:20 +0300 Subject: [PATCH] build scripts fixed for beta deploy --- Telegram/Build.sh | 3 +++ Telegram/Deploy.sh | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Telegram/Build.sh b/Telegram/Build.sh index f6dad296a..3aa9b88f6 100755 --- a/Telegram/Build.sh +++ b/Telegram/Build.sh @@ -281,6 +281,9 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg cp -v "$DeployPath/$UpdateFile" "$DeployToPath/" cp -v "$DeployPath/$SetupFile" "$DeployToPath/" cp -rv "$DeployPath/$BinaryName.app.dSYM" "$DeployToPath/" + if [ "$BetaVersion" != "0" ]; then + cp -v "$DeployPath/$BetaKeyFile" "$DeployToPath/" + fi fi elif [ "$BuildTarget" == "macstore" ]; then echo "Copying $BinaryName.app to deploy/$AppVersionStrMajor/$AppVersionStr.."; diff --git a/Telegram/Deploy.sh b/Telegram/Deploy.sh index ea1ca5d47..058cbf09d 100755 --- a/Telegram/Deploy.sh +++ b/Telegram/Deploy.sh @@ -89,14 +89,21 @@ fi DeployPath="$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStrFull" if [ "$BetaVersion" != "0" ]; then - if [ ! -f "$DeployPath/$BetaKeyFile" ]; then + if [ "$DeployTarget" == "win" ]; then + BetaFilePath="$WinDeployPath/$BetaKeyFile" + elif [ "$DeployTarget" == "mac32" ]; then + BetaFilePath="$Mac32DeployPath/$BetaKeyFile" + else + BetaFilePath="$DeployPath/$BetaKeyFile" + fi + if [ ! -f "$BetaFilePath" ]; then echo "Beta key file for $AppVersionStrFull not found :(" exit 1 fi while IFS='' read -r line || [[ -n "$line" ]]; do BetaSignature="$line" - done < "$DeployPath/$BetaKeyFile" + done < "$BetaFilePath" UpdateFile="${UpdateFile}_${BetaSignature}" if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then @@ -205,7 +212,7 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$Build if [ "$DeployWin" == "1" ]; then mv -v "$WinDeployPath/Telegram.pdb" "$DropboxDeployPath/" mv -v "$WinDeployPath/Updater.exe" "$DropboxDeployPath/" - mv -v "$WinDeployPath/Telegram.exe" "$DropboxDeployPath/" + mv -v "$WinDeployPath/Updater.pdb" "$DropboxDeployPath/" mv -v "$WinDeployPath/$WinUpdateFile" "$DropboxDeployPath/" if [ "$BetaVersion" == "0" ]; then mv -v "$WinDeployPath/$WinSetupFile" "$DropboxDeployPath/"