mirror of https://github.com/procxx/kepka.git
				
				
				
			Version 1.2.16: Improve release build scripts.
This commit is contained in:
		
							parent
							
								
									f3eac6b259
								
							
						
					
					
						commit
						d055908f4f
					
				| 
						 | 
					@ -58,7 +58,7 @@ set "SignPath=%HomePath%\..\..\TelegramPrivate\Sign.bat"
 | 
				
			||||||
set "SignAppxPath=%HomePath%\..\..\TelegramPrivate\AppxSign.bat"
 | 
					set "SignAppxPath=%HomePath%\..\..\TelegramPrivate\AppxSign.bat"
 | 
				
			||||||
set "BinaryName=Telegram"
 | 
					set "BinaryName=Telegram"
 | 
				
			||||||
set "DropboxSymbolsPath=Y:\Telegram\symbols"
 | 
					set "DropboxSymbolsPath=Y:\Telegram\symbols"
 | 
				
			||||||
set "FinalReleasePath=Z:\Telegram\deploy_temp\tsetup"
 | 
					set "FinalReleasePath=Z:\Telegram\backup"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if not exist %DropboxSymbolsPath% (
 | 
					if not exist %DropboxSymbolsPath% (
 | 
				
			||||||
  echo Dropbox path %DropboxSymbolsPath% not found!
 | 
					  echo Dropbox path %DropboxSymbolsPath% not found!
 | 
				
			||||||
| 
						 | 
					@ -247,7 +247,7 @@ if %BuildUWP% neq 0 (
 | 
				
			||||||
  if %errorlevel% neq 0 goto error
 | 
					  if %errorlevel% neq 0 goto error
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set "FinalDeployPath=%FinalReleasePath%\%AppVersionStrMajor%\%AppVersionStrFull%"
 | 
					set "FinalDeployPath=%FinalReleasePath%\%AppVersionStrMajor%\%AppVersionStrFull%\tsetup"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if %BuildUWP% equ 0 (
 | 
					if %BuildUWP% equ 0 (
 | 
				
			||||||
  echo.
 | 
					  echo.
 | 
				
			||||||
| 
						 | 
					@ -264,8 +264,7 @@ if %BuildUWP% equ 0 (
 | 
				
			||||||
  if not exist "%DeployPath%\Updater.exe" goto error
 | 
					  if not exist "%DeployPath%\Updater.exe" goto error
 | 
				
			||||||
  if not exist "%DeployPath%\Updater.pdb" goto error
 | 
					  if not exist "%DeployPath%\Updater.pdb" goto error
 | 
				
			||||||
  if not exist "%DeployPath%\Updater.exe.pdb" goto error
 | 
					  if not exist "%DeployPath%\Updater.exe.pdb" goto error
 | 
				
			||||||
  if not exist "%FinalReleasePath%\%AppVersionStrMajor%" mkdir "%FinalReleasePath%\%AppVersionStrMajor%"
 | 
					  md "%FinalDeployPath%"
 | 
				
			||||||
  if not exist "%FinalDeployPath%" mkdir "%FinalDeployPath%"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  xcopy "%DeployPath%\%UpdateFile%" "%FinalDeployPath%\" /Y
 | 
					  xcopy "%DeployPath%\%UpdateFile%" "%FinalDeployPath%\" /Y
 | 
				
			||||||
  xcopy "%DeployPath%\%PortableFile%" "%FinalDeployPath%\" /Y
 | 
					  xcopy "%DeployPath%\%PortableFile%" "%FinalDeployPath%\" /Y
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -121,6 +121,11 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
 | 
				
			||||||
    Error "Dropbox path not found!"
 | 
					    Error "Dropbox path not found!"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  BackupPath="/media/psf/backup/$AppVersionStrMajor/$AppVersionStrFull/t$BuildTarget"
 | 
				
			||||||
 | 
					  if [ ! -d "/media/psf/backup" ]; then
 | 
				
			||||||
 | 
					    Error "Backup folder not found!"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  gyp/refresh.sh
 | 
					  gyp/refresh.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  cd $ReleasePath
 | 
					  cd $ReleasePath
 | 
				
			||||||
| 
						 | 
					@ -226,6 +231,13 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  cd "$DeployPath"
 | 
					  cd "$DeployPath"
 | 
				
			||||||
  tar -cJvf "$SetupFile" "$BinaryName/"
 | 
					  tar -cJvf "$SetupFile" "$BinaryName/"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  mkdir -p $BackupPath
 | 
				
			||||||
 | 
					  cp "$SetupFile" "$BackupPath/"
 | 
				
			||||||
 | 
					  cp "$UpdateFile" "$BackupPath/"
 | 
				
			||||||
 | 
					  if [ "$BetaVersion" != "0" ]; then
 | 
				
			||||||
 | 
					    cp -v "$BetaKeyFile" "$BackupPath/"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then
 | 
					if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then
 | 
				
			||||||
| 
						 | 
					@ -235,6 +247,11 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg
 | 
				
			||||||
    Error "Dropbox path not found!"
 | 
					    Error "Dropbox path not found!"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  BackupPath="$HOME/Telegram/backup/$AppVersionStrMajor/$AppVersionStrFull"
 | 
				
			||||||
 | 
					  if [ ! -d "$HOME/Telegram/backup" ]; then
 | 
				
			||||||
 | 
					    Error "Backup path not found!"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  gyp/refresh.sh
 | 
					  gyp/refresh.sh
 | 
				
			||||||
  xcodebuild -project Telegram.xcodeproj -alltargets -configuration Release build
 | 
					  xcodebuild -project Telegram.xcodeproj -alltargets -configuration Release build
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -368,21 +385,20 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg
 | 
				
			||||||
    mv "$ReleasePath/$UpdateFile" "$DeployPath/"
 | 
					    mv "$ReleasePath/$UpdateFile" "$DeployPath/"
 | 
				
			||||||
    mv "$ReleasePath/$SetupFile" "$DeployPath/"
 | 
					    mv "$ReleasePath/$SetupFile" "$DeployPath/"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if [ "$BuildTarget" == "mac32" ]; then
 | 
					    if [ "$BuildTarget" == "mac" ]; then
 | 
				
			||||||
      ReleaseToPath="$HomePath/../../deploy_temp/tmac32"
 | 
					      mkdir -p "$BackupPath/tmac"
 | 
				
			||||||
      DeployToPath="$ReleaseToPath/$AppVersionStrMajor/$AppVersionStrFull"
 | 
					      cp "$DeployPath/$UpdateFile" "$BackupPath/tmac/"
 | 
				
			||||||
      if [ ! -d "$ReleaseToPath/$AppVersionStrMajor" ]; then
 | 
					      cp "$DeployPath/$SetupFile" "$BackupPath/tmac/"
 | 
				
			||||||
        mkdir "$ReleaseToPath/$AppVersionStrMajor"
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      if [ ! -d "$DeployToPath" ]; then
 | 
					 | 
				
			||||||
        mkdir "$DeployToPath"
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      cp -v "$DeployPath/$UpdateFile" "$DeployToPath/"
 | 
					 | 
				
			||||||
      cp -v "$DeployPath/$SetupFile" "$DeployToPath/"
 | 
					 | 
				
			||||||
      if [ "$BetaVersion" != "0" ]; then
 | 
					      if [ "$BetaVersion" != "0" ]; then
 | 
				
			||||||
        cp -v "$DeployPath/$BetaKeyFile" "$DeployToPath/"
 | 
					        cp -v "$DeployPath/$BetaKeyFile" "$BackupPath/tmac/"
 | 
				
			||||||
 | 
					      fi
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					    if [ "$BuildTarget" == "mac32" ]; then
 | 
				
			||||||
 | 
					      mkdir -p "$BackupPath/tmac32"
 | 
				
			||||||
 | 
					      cp "$DeployPath/$UpdateFile" "$BackupPath/tmac32/"
 | 
				
			||||||
 | 
					      cp "$DeployPath/$SetupFile" "$BackupPath/tmac32/"
 | 
				
			||||||
 | 
					      if [ "$BetaVersion" != "0" ]; then
 | 
				
			||||||
 | 
					        cp -v "$DeployPath/$BetaKeyFile" "$BackupPath/tmac32/"
 | 
				
			||||||
      fi
 | 
					      fi
 | 
				
			||||||
    fi
 | 
					    fi
 | 
				
			||||||
  elif [ "$BuildTarget" == "macstore" ]; then
 | 
					  elif [ "$BuildTarget" == "macstore" ]; then
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,180 +46,169 @@ fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo ""
 | 
					echo ""
 | 
				
			||||||
HomePath="$FullScriptPath/.."
 | 
					HomePath="$FullScriptPath/.."
 | 
				
			||||||
if [ "$BuildTarget" == "linux" ]; then
 | 
					DeployMac="0"
 | 
				
			||||||
  echo "Deploying version $AppVersionStrFull for Linux 64bit.."
 | 
					DeployMac32="0"
 | 
				
			||||||
  UpdateFile="tlinuxupd$AppVersion"
 | 
					DeployWin="0"
 | 
				
			||||||
  SetupFile="tsetup.$AppVersionStrFull.tar.xz"
 | 
					DeployLinux="0"
 | 
				
			||||||
  ReleasePath="$HomePath/../out/Release"
 | 
					DeployLinux32="0"
 | 
				
			||||||
  RemoteFolder="tlinux"
 | 
					if [ "$DeployTarget" == "mac" ]; then
 | 
				
			||||||
elif [ "$BuildTarget" == "linux32" ]; then
 | 
					  DeployMac="1"
 | 
				
			||||||
  echo "Deploying version $AppVersionStrFull for Linux 32bit.."
 | 
					  echo "Deploying version $AppVersionStrFull for OS X 10.8+.."
 | 
				
			||||||
  UpdateFile="tlinux32upd$AppVersion"
 | 
					elif [ "$DeployTarget" == "mac32" ]; then
 | 
				
			||||||
  SetupFile="tsetup32.$AppVersionStrFull.tar.xz"
 | 
					  DeployMac32="1"
 | 
				
			||||||
  ReleasePath="$HomePath/../out/Release"
 | 
					  echo "Deploying version $AppVersionStrFull for OS X 10.6 and 10.7.."
 | 
				
			||||||
  RemoteFolder="tlinux32"
 | 
					elif [ "$DeployTarget" == "win" ]; then
 | 
				
			||||||
elif [ "$BuildTarget" == "mac" ]; then
 | 
					  DeployWin="1"
 | 
				
			||||||
  DeployMac="0"
 | 
					  echo "Deploying version $AppVersionStrFull for Windows.."
 | 
				
			||||||
  DeployMac32="0"
 | 
					elif [ "$DeployTarget" == "linux" ]; then
 | 
				
			||||||
  DeployWin="0"
 | 
					  DeployLinux="1"
 | 
				
			||||||
  if [ "$DeployTarget" == "mac" ]; then
 | 
					  echo "Deploying version $AppVersionStrFull for Linux 64 bit.."
 | 
				
			||||||
    DeployMac="1"
 | 
					elif [ "$DeployTarget" == "linux32" ]; then
 | 
				
			||||||
    echo "Deploying version $AppVersionStrFull for OS X 10.8+.."
 | 
					  DeployLinux32="1"
 | 
				
			||||||
  elif [ "$DeployTarget" == "mac32" ]; then
 | 
					  echo "Deploying version $AppVersionStrFull for Linux 32 bit.."
 | 
				
			||||||
    DeployMac32="1"
 | 
					 | 
				
			||||||
    echo "Deploying version $AppVersionStrFull for OS X 10.6 and 10.7.."
 | 
					 | 
				
			||||||
  elif [ "$DeployTarget" == "win" ]; then
 | 
					 | 
				
			||||||
    DeployWin="1"
 | 
					 | 
				
			||||||
    echo "Deploying version $AppVersionStrFull for Windows.."
 | 
					 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
    DeployMac="1"
 | 
					 | 
				
			||||||
    if [ "$BetaVersion" != "0" ]; then
 | 
					 | 
				
			||||||
      DeployMac32="0"
 | 
					 | 
				
			||||||
    else
 | 
					 | 
				
			||||||
      DeployMac32="1"
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
    DeployWin="1"
 | 
					 | 
				
			||||||
    echo "Deploying three versions of $AppVersionStrFull: for Windows, OS X 10.6 and 10.7 and OS X 10.8+.."
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
  UpdateFile="tmacupd$AppVersion"
 | 
					 | 
				
			||||||
  SetupFile="tsetup.$AppVersionStrFull.dmg"
 | 
					 | 
				
			||||||
  ReleasePath="$HomePath/../out/Release"
 | 
					 | 
				
			||||||
  RemoteFolder="tmac"
 | 
					 | 
				
			||||||
  Mac32DeployPath="$HomePath/../../deploy_temp/tmac32/$AppVersionStrMajor/$AppVersionStrFull"
 | 
					 | 
				
			||||||
  Mac32UpdateFile="tmac32upd$AppVersion"
 | 
					 | 
				
			||||||
  Mac32SetupFile="tsetup32.$AppVersionStrFull.dmg"
 | 
					 | 
				
			||||||
  Mac32RemoteFolder="tmac32"
 | 
					 | 
				
			||||||
  WinDeployPath="$HomePath/../../deploy_temp/tsetup/$AppVersionStrMajor/$AppVersionStrFull"
 | 
					 | 
				
			||||||
  WinUpdateFile="tupdate$AppVersion"
 | 
					 | 
				
			||||||
  WinSetupFile="tsetup.$AppVersionStrFull.exe"
 | 
					 | 
				
			||||||
  WinPortableFile="tportable.$AppVersionStrFull.zip"
 | 
					 | 
				
			||||||
  WinRemoteFolder="tsetup"
 | 
					 | 
				
			||||||
  BackupPath="$HOME/Telegram/backup/$AppVersionStrMajor/$AppVersionStrFull"
 | 
					 | 
				
			||||||
elif [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" = "macstore" ]; then
 | 
					 | 
				
			||||||
  Error "No need to deploy this target."
 | 
					 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  Error "Invalid target!"
 | 
					  DeployMac="1"
 | 
				
			||||||
 | 
					  DeployWin="1"
 | 
				
			||||||
 | 
					  DeployLinux="1"
 | 
				
			||||||
 | 
					  if [ "$BetaVersion" == "0" ]; then
 | 
				
			||||||
 | 
					    DeployMac32="1"
 | 
				
			||||||
 | 
					    DeployLinux32="1"
 | 
				
			||||||
 | 
					    echo "Deploying five versions of $AppVersionStrFull: for Windows, OS X 10.6 and 10.7, OS X 10.8+, Linux 64 bit and Linux 32 bit.."
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    echo "Deploying three versions of $AppVersionStrFull: for Windows, OS X 10.8+ and Linux 64 bit.."
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					if [ "$BuildTarget" == "mac" ]; then
 | 
				
			||||||
DeployPath="$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStrFull"
 | 
					  BackupPath="$HOME/Telegram/backup"
 | 
				
			||||||
 | 
					elif [ "$BuildTarget" == "linux" ]; then
 | 
				
			||||||
 | 
					  BackupPath="/media/psf/Home/Telegram/backup"
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  Error "Can't deploy here"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					MacDeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull/tmac"
 | 
				
			||||||
 | 
					MacUpdateFile="tmacupd$AppVersion"
 | 
				
			||||||
 | 
					MacSetupFile="tsetup.$AppVersionStrFull.dmg"
 | 
				
			||||||
 | 
					MacRemoteFolder="tmac"
 | 
				
			||||||
 | 
					Mac32DeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull/tmac32"
 | 
				
			||||||
 | 
					Mac32UpdateFile="tmac32upd$AppVersion"
 | 
				
			||||||
 | 
					Mac32SetupFile="tsetup32.$AppVersionStrFull.dmg"
 | 
				
			||||||
 | 
					Mac32RemoteFolder="tmac32"
 | 
				
			||||||
 | 
					WinDeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull/tsetup"
 | 
				
			||||||
 | 
					WinUpdateFile="tupdate$AppVersion"
 | 
				
			||||||
 | 
					WinSetupFile="tsetup.$AppVersionStrFull.exe"
 | 
				
			||||||
 | 
					WinPortableFile="tportable.$AppVersionStrFull.zip"
 | 
				
			||||||
 | 
					WinRemoteFolder="tsetup"
 | 
				
			||||||
 | 
					LinuxDeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull/tlinux"
 | 
				
			||||||
 | 
					LinuxUpdateFile="tlinuxupd$AppVersion"
 | 
				
			||||||
 | 
					LinuxSetupFile="tsetup.$AppVersionStrFull.tar.xz"
 | 
				
			||||||
 | 
					LinuxRemoteFolder="tlinux"
 | 
				
			||||||
 | 
					Linux32DeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull/tlinux32"
 | 
				
			||||||
 | 
					Linux32UpdateFile="tlinux32upd$AppVersion"
 | 
				
			||||||
 | 
					Linux32SetupFile="tsetup32.$AppVersionStrFull.tar.xz"
 | 
				
			||||||
 | 
					Linux32RemoteFolder="tlinux32"
 | 
				
			||||||
 | 
					DeployPath="$BackupPath/$AppVersionStrMajor/$AppVersionStrFull"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ "$BetaVersion" != "0" ]; then
 | 
					if [ "$BetaVersion" != "0" ]; then
 | 
				
			||||||
  if [ "$DeployTarget" == "win" ]; then
 | 
					  if [ "$DeployTarget" == "win" ]; then
 | 
				
			||||||
    BetaFilePath="$WinDeployPath/$BetaKeyFile"
 | 
					    BetaFilePath="$WinDeployPath/$BetaKeyFile"
 | 
				
			||||||
  elif [ "$DeployTarget" == "mac32" ]; then
 | 
					  elif [ "$DeployTarget" == "mac32" ]; then
 | 
				
			||||||
    BetaFilePath="$Mac32DeployPath/$BetaKeyFile"
 | 
					    BetaFilePath="$Mac32DeployPath/$BetaKeyFile"
 | 
				
			||||||
 | 
					  elif [ "$DeployTarget" == "linux" ]; then
 | 
				
			||||||
 | 
					    BetaFilePath="$LinuxDeployPath/$BetaKeyFile"
 | 
				
			||||||
 | 
					  elif [ "$DeployTarget" == "linux32" ]; then
 | 
				
			||||||
 | 
					    BetaFilePath="$Linux32DeployPath/$BetaKeyFile"
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    BetaFilePath="$DeployPath/$BetaKeyFile"
 | 
					    BetaFilePath="$MacDeployPath/$BetaKeyFile"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  if [ ! -f "$BetaFilePath" ]; then
 | 
					  if [ ! -f "$BetaFilePath" ]; then
 | 
				
			||||||
    Error "Beta key file for $AppVersionStrFull not found :("
 | 
					    Error "Beta key file for $AppVersionStrFull not found."
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  while IFS='' read -r line || [[ -n "$line" ]]; do
 | 
					  while IFS='' read -r line || [[ -n "$line" ]]; do
 | 
				
			||||||
    BetaSignature="$line"
 | 
					    BetaSignature="$line"
 | 
				
			||||||
  done < "$BetaFilePath"
 | 
					  done < "$BetaFilePath"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  UpdateFile="${UpdateFile}_${BetaSignature}"
 | 
					  MacUpdateFile="${MacUpdateFile}_${BetaSignature}"
 | 
				
			||||||
  if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
 | 
					  MacSetupFile="tbeta${BetaVersion}_${BetaSignature}.zip"
 | 
				
			||||||
    SetupFile="tbeta${BetaVersion}_${BetaSignature}.tar.xz"
 | 
					  Mac32UpdateFile="${Mac32UpdateFile}_${BetaSignature}"
 | 
				
			||||||
  elif [ "$BuildTarget" == "mac" ]; then
 | 
					  Mac32SetupFile="tbeta${BetaVersion}_${BetaSignature}.zip"
 | 
				
			||||||
    SetupFile="tbeta${BetaVersion}_${BetaSignature}.zip"
 | 
					  WinUpdateFile="${WinUpdateFile}_${BetaSignature}"
 | 
				
			||||||
    Mac32UpdateFile="${Mac32UpdateFile}_${BetaSignature}"
 | 
					  WinPortableFile="tbeta${BetaVersion}_${BetaSignature}.zip"
 | 
				
			||||||
    Mac32SetupFile="tbeta${BetaVersion}_${BetaSignature}.zip"
 | 
					  LinuxUpdateFile="${LinuxUpdateFile}_${BetaSignature}"
 | 
				
			||||||
    WinUpdateFile="${WinUpdateFile}_${BetaSignature}"
 | 
					  LinuxSetupFile="tbeta${BetaVersion}_${BetaSignature}.tar.xz"
 | 
				
			||||||
    WinPortableFile="tbeta${BetaVersion}_${BetaSignature}.zip"
 | 
					  Linux32UpdateFile="${Linux32UpdateFile}_${BetaSignature}"
 | 
				
			||||||
 | 
					  Linux32SetupFile="tbeta${BetaVersion}_${BetaSignature}.tar.xz"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ "$DeployMac" == "1" ]; then
 | 
				
			||||||
 | 
					  if [ ! -f "$MacDeployPath/$MacUpdateFile" ]; then
 | 
				
			||||||
 | 
					    Error "$MacDeployPath/$MacUpdateFile not found!";
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
elif [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
 | 
					  if [ ! -f "$MacDeployPath/$MacSetupFile" ]; then
 | 
				
			||||||
  BackupPath="/media/psf/backup/$AppVersionStrMajor/$AppVersionStrFull/t$BuildTarget"
 | 
					    Error "$MacDeployPath/$MacSetupFile not found!"
 | 
				
			||||||
  if [ ! -d "/media/psf/backup" ]; then
 | 
					  fi
 | 
				
			||||||
    Error "Backup folder not found!"
 | 
					fi
 | 
				
			||||||
 | 
					if [ "$DeployMac32" == "1" ]; then
 | 
				
			||||||
 | 
					  if [ ! -f "$Mac32DeployPath/$Mac32UpdateFile" ]; then
 | 
				
			||||||
 | 
					    Error "$Mac32UpdateFile not found!"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					  if [ ! -f "$Mac32DeployPath/$Mac32SetupFile" ]; then
 | 
				
			||||||
 | 
					    Error "$Mac32SetupFile not found!"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					if [ "$DeployWin" == "1" ]; then
 | 
				
			||||||
 | 
					  if [ ! -f "$WinDeployPath/$WinUpdateFile" ]; then
 | 
				
			||||||
 | 
					    Error "$WinUpdateFile not found!"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					  if [ "$BetaVersion" == "0" ]; then
 | 
				
			||||||
 | 
					    if [ ! -f "$WinDeployPath/$WinSetupFile" ]; then
 | 
				
			||||||
 | 
					      Error "$WinSetupFile not found!"
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					  if [ ! -f "$WinDeployPath/$WinPortableFile" ]; then
 | 
				
			||||||
 | 
					    Error "$WinPortableFile not found!"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					if [ "$DeployLinux" == "1" ]; then
 | 
				
			||||||
 | 
					  if [ ! -f "$LinuxDeployPath/$LinuxUpdateFile" ]; then
 | 
				
			||||||
 | 
					    Error "$LinuxDeployPath/$LinuxUpdateFile not found!"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					  if [ ! -f "$LinuxDeployPath/$LinuxSetupFile" ]; then
 | 
				
			||||||
 | 
					    Error "$LinuxDeployPath/$LinuxSetupFile not found!"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					if [ "$DeployLinux32" == "1" ]; then
 | 
				
			||||||
 | 
					  if [ ! -f "$Linux32DeployPath/$Linux32UpdateFile" ]; then
 | 
				
			||||||
 | 
					    Error "$Linux32DeployPath/$Linux32UpdateFile not found!"
 | 
				
			||||||
 | 
					  fi
 | 
				
			||||||
 | 
					  if [ ! -f "$Linux32DeployPath/$Linux32SetupFile" ]; then
 | 
				
			||||||
 | 
					    Error "$Linux32DeployPath/$Linux32SetupFile not found!"
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then
 | 
					$FullScriptPath/../../../TelegramPrivate/mount.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if [ "$BuildTarget" != "mac" ] || [ "$DeployMac" == "1" ]; then
 | 
					declare -a Files
 | 
				
			||||||
    if [ ! -f "$DeployPath/$UpdateFile" ]; then
 | 
					if [ "$DeployMac" == "1" ]; then
 | 
				
			||||||
      Error "$UpdateFile not found!";
 | 
					  Files+=("tmac/$MacUpdateFile" "tmac/$MacSetupFile")
 | 
				
			||||||
    fi
 | 
					fi
 | 
				
			||||||
 | 
					if [ "$DeployMac32" == "1" ]; then
 | 
				
			||||||
    if [ ! -f "$DeployPath/$SetupFile" ]; then
 | 
					  Files+=("tmac32/$Mac32UpdateFile" "tmac32/$Mac32SetupFile")
 | 
				
			||||||
      Error "$SetupFile not found!"
 | 
					fi
 | 
				
			||||||
    fi
 | 
					if [ "$DeployWin" == "1" ]; then
 | 
				
			||||||
  fi
 | 
					  Files+=("tsetup/$WinUpdateFile" "tsetup/$WinPortableFile")
 | 
				
			||||||
 | 
					  if [ "$BetaVersion" == "0" ]; then
 | 
				
			||||||
  if [ "$BuildTarget" == "mac" ]; then
 | 
					    Files+=("tsetup/$WinSetupFile")
 | 
				
			||||||
    if [ "$DeployMac32" == "1" ]; then
 | 
					 | 
				
			||||||
      if [ ! -f "$Mac32DeployPath/$Mac32UpdateFile" ]; then
 | 
					 | 
				
			||||||
        Error "$Mac32UpdateFile not found!"
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      if [ ! -f "$Mac32DeployPath/$Mac32SetupFile" ]; then
 | 
					 | 
				
			||||||
        Error "$Mac32SetupFile not found!"
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if [ "$DeployWin" == "1" ]; then
 | 
					 | 
				
			||||||
      if [ ! -f "$WinDeployPath/$WinUpdateFile" ]; then
 | 
					 | 
				
			||||||
        Error "$WinUpdateFile not found!"
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      if [ "$BetaVersion" == "0" ]; then
 | 
					 | 
				
			||||||
        if [ ! -f "$WinDeployPath/$WinSetupFile" ]; then
 | 
					 | 
				
			||||||
          Error "$WinSetupFile not found!"
 | 
					 | 
				
			||||||
        fi
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      if [ ! -f "$WinDeployPath/$WinPortableFile" ]; then
 | 
					 | 
				
			||||||
        Error "$WinPortableFile not found!"
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
#fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$BuildTarget" == "mac" ]; then
 | 
					 | 
				
			||||||
  if [ "$BuildTarget" != "mac" ] || [ "$DeployMac" == "1" ]; then
 | 
					 | 
				
			||||||
    rsync -av --progress "$DeployPath/$UpdateFile" "$DeployPath/$SetupFile" "tmaster:tdesktop/www/$RemoteFolder/"
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
  if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
 | 
					 | 
				
			||||||
    if [ "$BetaVersion" == "0" ]; then
 | 
					 | 
				
			||||||
      mkdir -p "$BackupPath"
 | 
					 | 
				
			||||||
      cp "$DeployPath/$SetupFile" "$BackupPath"
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
  fi
 | 
					 | 
				
			||||||
  if [ "$BuildTarget" == "mac" ]; then
 | 
					 | 
				
			||||||
    if [ "$DeployMac32" == "1" ]; then
 | 
					 | 
				
			||||||
      rsync -av --progress "$Mac32DeployPath/$Mac32UpdateFile" "$Mac32DeployPath/$Mac32SetupFile" "tmaster:tdesktop/www/$Mac32RemoteFolder/"
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
    if [ "$DeployWin" == "1" ]; then
 | 
					 | 
				
			||||||
      if [ "$BetaVersion" == "0" ]; then
 | 
					 | 
				
			||||||
        rsync -av --progress "$WinDeployPath/$WinUpdateFile" "$WinDeployPath/$WinSetupFile" "$WinDeployPath/$WinPortableFile" "tmaster:tdesktop/www/$WinRemoteFolder/"
 | 
					 | 
				
			||||||
      else
 | 
					 | 
				
			||||||
        rsync -av --progress "$WinDeployPath/$WinUpdateFile" "$WinDeployPath/$WinPortableFile" "tmaster:tdesktop/www/$WinRemoteFolder/"
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if [ "$DeployMac" == "1" ]; then
 | 
					 | 
				
			||||||
      if [ "$BetaVersion" == "0" ]; then
 | 
					 | 
				
			||||||
        mkdir -p "$BackupPath/tmac"
 | 
					 | 
				
			||||||
        mv -v "$DeployPath/$SetupFile" "$BackupPath/tmac/"
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
    if [ "$DeployMac32" == "1" ]; then
 | 
					 | 
				
			||||||
      if [ "$BetaVersion" == "0" ]; then
 | 
					 | 
				
			||||||
        mkdir -p "$BackupPath/tmac32"
 | 
					 | 
				
			||||||
        mv -v "$Mac32DeployPath/$Mac32SetupFile" "$BackupPath/tmac32/"
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
    if [ "$DeployWin" == "1" ]; then
 | 
					 | 
				
			||||||
      if [ "$BetaVersion" == "0" ]; then
 | 
					 | 
				
			||||||
        mkdir -p "$BackupPath/tsetup"
 | 
					 | 
				
			||||||
        mv -v "$WinDeployPath/$WinSetupFile" "$BackupPath/tsetup/"
 | 
					 | 
				
			||||||
        mv -v "$WinDeployPath/$WinPortableFile" "$BackupPath/tsetup/"
 | 
					 | 
				
			||||||
      fi
 | 
					 | 
				
			||||||
    fi
 | 
					 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					if [ "$DeployLinux" == "1" ]; then
 | 
				
			||||||
 | 
					  Files+=("tlinux/$LinuxUpdateFile" "tlinux/$LinuxSetupFile")
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					if [ "$DeployLinux32" == "1" ]; then
 | 
				
			||||||
 | 
					  Files+=("tlinux32/$Linux32UpdateFile" "tlinux32/$Linux32SetupFile")
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					cd $DeployPath
 | 
				
			||||||
 | 
					rsync -avR --progress ${Files[@]} "$FullScriptPath/../../../TelegramPrivate/remote/files"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Version $AppVersionStrFull was deployed!"
 | 
					echo "Version $AppVersionStrFull was deployed!"
 | 
				
			||||||
cd $FullExecPath
 | 
					cd $FullExecPath
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue