release.sh 1009 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. set -e
  2. FullExecPath=$PWD
  3. pushd `dirname $0` > /dev/null
  4. FullScriptPath=`pwd`
  5. popd > /dev/null
  6. Param1="$1"
  7. Param2="$2"
  8. Param3="$3"
  9. Param4="$4"
  10. if [ ! -d "$FullScriptPath/../../../DesktopPrivate" ]; then
  11. echo ""
  12. echo "This script is for building the production version of Telegram Desktop."
  13. echo ""
  14. echo "For building custom versions please visit the build instructions page at:"
  15. echo "https://github.com/telegramdesktop/tdesktop/#build-instructions"
  16. exit
  17. fi
  18. Error () {
  19. cd $FullExecPath
  20. echo "$1"
  21. exit 1
  22. }
  23. while IFS='' read -r line || [[ -n "$line" ]]; do
  24. set $line
  25. eval $1="$2"
  26. done < "$FullScriptPath/version"
  27. VersionForPacker="$AppVersion"
  28. if [ "$AlphaVersion" != "0" ]; then
  29. Error "No releases for closed alpha versions"
  30. elif [ "$BetaChannel" == "0" ]; then
  31. AppVersionStrFull="$AppVersionStr"
  32. AlphaBetaParam=''
  33. else
  34. AppVersionStrFull="$AppVersionStr.beta"
  35. AlphaBetaParam='-beta'
  36. fi
  37. cd "$FullScriptPath"
  38. python3 release.py $AppVersionStr $Param1 $Param2 $Param3 $Param4