2014-08-15 12:44:01 +00:00
|
|
|
AppVersionStr=0.5.16
|
|
|
|
AppVersion=5016
|
2014-06-25 07:25:55 +00:00
|
|
|
|
2014-07-14 13:59:11 +00:00
|
|
|
if [ -d "./../Mac/Release/deploy/$AppVersionStr" ]; then
|
2014-06-25 07:25:55 +00:00
|
|
|
echo "Deploy folder for version $AppVersionStr already exists!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-07-14 13:59:11 +00:00
|
|
|
if [ -f "./../Mac/Release/tupdate$AppVersion" ]; then
|
2014-06-25 07:25:55 +00:00
|
|
|
echo "Update file for version $AppVersion already exists!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-07-14 13:59:11 +00:00
|
|
|
if [ ! -d "./../Mac/Release/Telegram.app" ]; then
|
2014-06-25 07:25:55 +00:00
|
|
|
echo "Telegram.app not found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-07-14 13:59:11 +00:00
|
|
|
|
|
|
|
if [ ! -f "./../Mac/Release/Telegram.app/Contents/Resources/Icon.icns" ]; then
|
|
|
|
echo "Icon.icns not found in Resources!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f "./../Mac/Release/Telegram.app/Contents/MacOS/Telegram" ]; then
|
|
|
|
echo "Telegram not found in MacOS!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f "./../Mac/Release/Telegram.app/Contents/Frameworks/Updater" ]; then
|
2014-07-18 10:37:34 +00:00
|
|
|
echo "Updater not found in Frameworks!"
|
2014-07-14 13:59:11 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-07-15 06:00:54 +00:00
|
|
|
if [ ! -f "./../Mac/Release/Telegram.app.dmg" ]; then
|
|
|
|
echo "Telegram.app.dmg not found!"
|
2014-07-14 13:59:11 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-06-25 07:25:55 +00:00
|
|
|
echo "Preparing version $AppVersionStr, executing Packer.."
|
2014-07-14 13:59:11 +00:00
|
|
|
cd ./../Mac/Release && ./Packer.app/Contents/MacOS/Packer -path Telegram.app -version $AppVersion && cd ./../../Telegram
|
2014-06-25 07:25:55 +00:00
|
|
|
echo "Packer done!"
|
|
|
|
|
2014-07-14 13:59:11 +00:00
|
|
|
if [ ! -d "./../Mac/Release/deploy/" ]; then
|
|
|
|
mkdir "./../Mac/Release/deploy"
|
2014-06-25 07:25:55 +00:00
|
|
|
fi
|
|
|
|
echo "Copying Telegram.app and tmacupd$AppVersion to deploy/$AppVersionStr..";
|
2014-07-14 13:59:11 +00:00
|
|
|
mkdir "./../Mac/Release/deploy/$AppVersionStr"
|
|
|
|
mkdir "./../Mac/Release/deploy/$AppVersionStr/Telegram"
|
2014-07-15 06:00:54 +00:00
|
|
|
cp -r ./../Mac/Release/Telegram.app ./../Mac/Release/deploy/$AppVersionStr/Telegram/
|
|
|
|
rm ./../Mac/Release/Telegram.app/Contents/MacOS/Telegram
|
|
|
|
rm ./../Mac/Release/Telegram.app/Contents/Frameworks/Updater
|
2014-07-14 13:59:11 +00:00
|
|
|
mv ./../Mac/Release/tmacupd$AppVersion ./../Mac/Release/deploy/$AppVersionStr/
|
2014-07-15 06:00:54 +00:00
|
|
|
mv ./../Mac/Release/Telegram.app.dmg ./../Mac/Release/deploy/$AppVersionStr/tsetup.$AppVersionStr.dmg
|
2014-06-25 07:25:55 +00:00
|
|
|
echo "Version $AppVersionStr prepared!";
|
|
|
|
|