2017-03-21 19:48:04 +00:00
|
|
|
set -e
|
|
|
|
FullExecPath=$PWD
|
|
|
|
pushd `dirname $0` > /dev/null
|
|
|
|
FullScriptPath=`pwd`
|
|
|
|
popd > /dev/null
|
|
|
|
|
|
|
|
Param1="$1"
|
|
|
|
Param2="$2"
|
|
|
|
Param3="$3"
|
|
|
|
Param4="$4"
|
|
|
|
|
2019-09-26 09:52:36 +00:00
|
|
|
if [ ! -d "$FullScriptPath/../../../DesktopPrivate" ]; then
|
2017-03-21 19:48:04 +00:00
|
|
|
echo ""
|
|
|
|
echo "This script is for building the production version of Telegram Desktop."
|
|
|
|
echo ""
|
|
|
|
echo "For building custom versions please visit the build instructions page at:"
|
|
|
|
echo "https://github.com/telegramdesktop/tdesktop/#build-instructions"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
Error () {
|
|
|
|
cd $FullExecPath
|
|
|
|
echo "$1"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
|
|
|
set $line
|
|
|
|
eval $1="$2"
|
|
|
|
done < "$FullScriptPath/version"
|
|
|
|
|
|
|
|
VersionForPacker="$AppVersion"
|
2018-09-26 14:58:09 +00:00
|
|
|
if [ "$AlphaVersion" != "0" ]; then
|
|
|
|
Error "No releases for closed alpha versions"
|
|
|
|
elif [ "$BetaChannel" == "0" ]; then
|
2017-03-21 19:48:04 +00:00
|
|
|
AppVersionStrFull="$AppVersionStr"
|
|
|
|
AlphaBetaParam=''
|
|
|
|
else
|
2018-09-26 14:58:09 +00:00
|
|
|
AppVersionStrFull="$AppVersionStr.beta"
|
|
|
|
AlphaBetaParam='-beta'
|
2017-03-21 19:48:04 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
cd "$FullScriptPath"
|
2018-03-08 21:26:58 +00:00
|
|
|
python3 release.py $AppVersionStr $Param1 $Param2 $Param3 $Param4
|