2015-10-01 14:26:06 +00:00
|
|
|
set -e
|
|
|
|
|
2015-09-24 14:17:53 +00:00
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
|
|
|
set $line
|
|
|
|
eval $1="$2"
|
|
|
|
done < Version
|
|
|
|
|
2015-12-03 19:22:40 +00:00
|
|
|
VersionForPacker="$AppVersion"
|
|
|
|
if [ "$BetaVersion" != "0" ]; then
|
2015-12-03 18:16:34 +00:00
|
|
|
AppVersion="$BetaVersion"
|
2015-12-03 19:22:40 +00:00
|
|
|
AppVersionStrFull="${AppVersionStr}_${BetaVersion}"
|
2015-12-03 18:16:34 +00:00
|
|
|
DevParam="-beta $BetaVersion"
|
2015-12-03 19:22:40 +00:00
|
|
|
BetaKeyFile="tbeta_${AppVersion}_key"
|
2015-12-03 18:16:34 +00:00
|
|
|
elif [ "$DevChannel" == "0" ]; then
|
|
|
|
AppVersionStrFull="$AppVersionStr"
|
|
|
|
DevParam=''
|
|
|
|
else
|
2015-09-24 14:17:53 +00:00
|
|
|
AppVersionStrFull="$AppVersionStr.dev"
|
|
|
|
DevParam='-dev'
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f "Target" ]; then
|
|
|
|
echo "Build target not found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
|
|
|
BuildTarget="$line"
|
|
|
|
done < Target
|
|
|
|
|
|
|
|
echo ""
|
2015-12-03 18:16:34 +00:00
|
|
|
HomePath="./../../Telegram"
|
2015-09-24 14:17:53 +00:00
|
|
|
if [ "$BuildTarget" == "linux" ]; then
|
|
|
|
echo "Building version $AppVersionStrFull for Linux 64bit.."
|
|
|
|
UpdateFile="tlinuxupd$AppVersion"
|
|
|
|
SetupFile="tsetup.$AppVersionStrFull.tar.xz"
|
2015-10-01 15:16:21 +00:00
|
|
|
WorkPath="./../Linux"
|
|
|
|
FixScript="$HomePath/FixMake.sh"
|
2015-09-24 14:17:53 +00:00
|
|
|
ReleasePath="./../Linux/Release"
|
2016-02-04 12:44:39 +00:00
|
|
|
BinaryName="Telegram"
|
2015-09-24 14:17:53 +00:00
|
|
|
elif [ "$BuildTarget" == "linux32" ]; then
|
|
|
|
echo "Building version $AppVersionStrFull for Linux 32bit.."
|
|
|
|
UpdateFile="tlinux32upd$AppVersion"
|
|
|
|
SetupFile="tsetup32.$AppVersionStrFull.tar.xz"
|
2015-10-01 15:16:21 +00:00
|
|
|
WorkPath="./../Linux"
|
|
|
|
FixScript="$HomePath/FixMake32.sh"
|
2015-09-24 14:17:53 +00:00
|
|
|
ReleasePath="./../Linux/Release"
|
2016-02-04 12:44:39 +00:00
|
|
|
BinaryName="Telegram"
|
2015-09-24 14:17:53 +00:00
|
|
|
elif [ "$BuildTarget" == "mac" ]; then
|
|
|
|
echo "Building version $AppVersionStrFull for OS X 10.8+.."
|
|
|
|
UpdateFile="tmacupd$AppVersion"
|
|
|
|
SetupFile="tsetup.$AppVersionStrFull.dmg"
|
|
|
|
ReleasePath="./../Mac/Release"
|
2015-09-24 18:18:21 +00:00
|
|
|
BinaryName="Telegram"
|
2015-09-24 14:17:53 +00:00
|
|
|
elif [ "$BuildTarget" == "mac32" ]; then
|
|
|
|
echo "Building version $AppVersionStrFull for OS X 10.6 and 10.7.."
|
|
|
|
UpdateFile="tmac32upd$AppVersion"
|
|
|
|
SetupFile="tsetup32.$AppVersionStrFull.dmg"
|
|
|
|
ReleasePath="./../Mac/Release"
|
2015-09-24 18:18:21 +00:00
|
|
|
BinaryName="Telegram"
|
2015-09-24 14:17:53 +00:00
|
|
|
elif [ "$BuildTarget" == "macstore" ]; then
|
2015-12-03 19:22:40 +00:00
|
|
|
if [ "$BetaVersion" != "0" ]; then
|
2015-12-03 18:16:34 +00:00
|
|
|
echo "Can't build macstore beta version!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-09-24 14:17:53 +00:00
|
|
|
echo "Building version $AppVersionStrFull for Mac App Store.."
|
|
|
|
ReleasePath="./../Mac/Release"
|
2015-09-24 18:18:21 +00:00
|
|
|
BinaryName="Telegram Desktop"
|
|
|
|
DropboxPath="./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor"
|
|
|
|
DropboxDeployPath="$DropboxPath/$AppVersionStrFull"
|
2015-09-24 14:17:53 +00:00
|
|
|
else
|
|
|
|
echo "Invalid target!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
#if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ] || [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then
|
2015-12-03 19:22:40 +00:00
|
|
|
if [ "$BetaVersion" != "0" ]; then
|
2015-12-03 18:16:34 +00:00
|
|
|
if [ -f "$ReleasePath/$BetaKeyFile" ]; then
|
|
|
|
echo "Beta version key file for version $AppVersion already exists!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2015-12-03 19:22:40 +00:00
|
|
|
|
|
|
|
if [ -d "$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStrFull" ]; then
|
|
|
|
echo "Deploy folder for version $AppVersionStrFull already exists!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2015-12-03 18:16:34 +00:00
|
|
|
else
|
|
|
|
if [ -d "$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStr.dev" ]; then
|
|
|
|
echo "Deploy folder for version $AppVersionStr.dev already exists!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "$ReleasePath/$UpdateFile" ]; then
|
|
|
|
echo "Update file for version $AppVersion already exists!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2015-09-24 14:17:53 +00:00
|
|
|
|
2015-12-03 19:22:40 +00:00
|
|
|
if [ -d "$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStr" ]; then
|
|
|
|
echo "Deploy folder for version $AppVersionStr already exists!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2015-09-24 14:17:53 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
DeployPath="$ReleasePath/deploy/$AppVersionStrMajor/$AppVersionStrFull"
|
|
|
|
#fi
|
|
|
|
|
|
|
|
if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then
|
2016-02-04 12:44:39 +00:00
|
|
|
|
|
|
|
DropboxSymbolsPath="/media/psf/Home/Dropbox/Telegram/symbols"
|
|
|
|
|
2015-10-01 15:16:21 +00:00
|
|
|
mkdir -p "$WorkPath/ReleaseIntermediateUpdater"
|
|
|
|
cd "$WorkPath/ReleaseIntermediateUpdater"
|
2015-10-19 21:24:39 +00:00
|
|
|
/usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro"
|
2015-10-01 15:16:21 +00:00
|
|
|
make
|
|
|
|
echo "Updater build complete!"
|
|
|
|
cd "$HomePath"
|
2015-12-03 18:16:34 +00:00
|
|
|
|
2015-10-01 15:16:21 +00:00
|
|
|
mkdir -p "$WorkPath/ReleaseIntermediate"
|
|
|
|
cd "$WorkPath/ReleaseIntermediate"
|
2015-10-19 21:24:39 +00:00
|
|
|
/usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro"
|
2015-10-01 15:16:21 +00:00
|
|
|
eval "$FixScript"
|
|
|
|
make
|
|
|
|
echo "Telegram build complete!"
|
2015-12-03 18:16:34 +00:00
|
|
|
cd "$HomePath"
|
2016-02-04 12:44:39 +00:00
|
|
|
if [ ! -f "$ReleasePath/$BinaryName" ]; then
|
|
|
|
echo "$BinaryName not found!"
|
2015-09-24 14:17:53 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -f "$ReleasePath/Updater" ]; then
|
|
|
|
echo "Updater not found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-02-04 12:44:39 +00:00
|
|
|
echo "Dumping debug symbols.."
|
|
|
|
"./../../Libraries/breakpad/src/tools/linux/dump_syms/dump_syms" "$ReleasePath/$BinaryName" > "$ReleasePath/$BinaryName.sym"
|
|
|
|
echo "Done!"
|
|
|
|
|
|
|
|
echo "Stripping the executable.."
|
|
|
|
strip -s "$ReleasePath/$BinaryName"
|
|
|
|
echo "Done!"
|
|
|
|
|
2015-09-24 14:17:53 +00:00
|
|
|
echo "Preparing version $AppVersionStrFull, executing Packer.."
|
2016-02-04 12:44:39 +00:00
|
|
|
cd "$ReleasePath" && "./Packer" -path "$BinaryName" -path Updater -version $VersionForPacker $DevParam && cd "$HomePath"
|
2015-09-24 14:17:53 +00:00
|
|
|
echo "Packer done!"
|
|
|
|
|
2015-12-03 18:16:34 +00:00
|
|
|
if [ "$BetaVersion" != "0" ]; then
|
|
|
|
if [ ! -f "$ReleasePath/$BetaKeyFile" ]; then
|
|
|
|
echo "Beta version key file not found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
|
|
|
BetaSignature="$line"
|
|
|
|
done < "$ReleasePath/$BetaKeyFile"
|
|
|
|
|
2015-12-03 19:22:40 +00:00
|
|
|
UpdateFile="${UpdateFile}_${BetaSignature}"
|
|
|
|
SetupFile="tbeta${BetaVersion}_${BetaSignature}.tar.xz"
|
2015-12-03 18:16:34 +00:00
|
|
|
fi
|
|
|
|
|
2016-02-04 12:44:39 +00:00
|
|
|
SymbolsHash=`head -n 1 "$ReleasePath/$BinaryName.sym" | awk -F " " 'END {print $4}'`
|
|
|
|
echo "Copying $BinaryName.sym to $DropboxSymbolsPath/$BinaryName/$SymbolsHash"
|
|
|
|
mkdir -p "$DropboxSymbolsPath/$BinaryName/$SymbolsHash"
|
|
|
|
cp "$ReleasePath/$BinaryName.sym" "$DropboxSymbolsPath/$BinaryName/$SymbolsHash/"
|
|
|
|
echo "Done!"
|
|
|
|
|
2015-09-24 14:17:53 +00:00
|
|
|
if [ ! -d "$ReleasePath/deploy" ]; then
|
|
|
|
mkdir "$ReleasePath/deploy"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "$ReleasePath/deploy/$AppVersionStrMajor" ]; then
|
|
|
|
mkdir "$ReleasePath/deploy/$AppVersionStrMajor"
|
|
|
|
fi
|
|
|
|
|
2016-02-04 12:44:39 +00:00
|
|
|
echo "Copying $BinaryName, Updater and $UpdateFile to deploy/$AppVersionStrMajor/$AppVersionStrFull..";
|
2015-09-24 14:17:53 +00:00
|
|
|
mkdir "$DeployPath"
|
2016-02-04 12:44:39 +00:00
|
|
|
mkdir "$DeployPath/$BinaryName"
|
|
|
|
mv "$ReleasePath/$BinaryName" "$DeployPath/Telegram/"
|
2015-12-03 18:16:34 +00:00
|
|
|
mv "$ReleasePath/Updater" "$DeployPath/Telegram/"
|
|
|
|
mv "$ReleasePath/$UpdateFile" "$DeployPath/"
|
|
|
|
if [ "$BetaVersion" != "0" ]; then
|
|
|
|
mv "$ReleasePath/$BetaKeyFile" "$DeployPath/"
|
|
|
|
fi
|
|
|
|
cd "$DeployPath" && tar -cJvf "$SetupFile" "Telegram/" && cd "./../../../$HomePath"
|
2015-09-24 14:17:53 +00:00
|
|
|
fi
|
|
|
|
|
2015-09-24 18:18:21 +00:00
|
|
|
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then
|
2015-09-29 13:24:39 +00:00
|
|
|
|
2016-02-04 12:44:39 +00:00
|
|
|
DropboxSymbolsPath="./../../../Dropbox/Telegram/symbols"
|
|
|
|
|
2015-12-03 18:16:34 +00:00
|
|
|
touch "./SourceFiles/telegram.qrc"
|
2015-10-01 14:26:06 +00:00
|
|
|
xcodebuild -project Telegram.xcodeproj -alltargets -configuration Release build
|
2015-09-29 13:24:39 +00:00
|
|
|
|
2015-09-24 18:18:21 +00:00
|
|
|
if [ ! -d "$ReleasePath/$BinaryName.app" ]; then
|
|
|
|
echo "$BinaryName.app not found!"
|
2015-09-24 14:17:53 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-09-24 18:18:21 +00:00
|
|
|
if [ ! -d "$ReleasePath/$BinaryName.app.dSYM" ]; then
|
|
|
|
echo "$BinaryName.app.dSYM not found!"
|
2015-09-24 14:17:53 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-02-04 12:44:39 +00:00
|
|
|
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
|
|
|
|
echo "Removing Updater debug symbols.."
|
|
|
|
rm -rf "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater.dSYM"
|
|
|
|
echo "Done!"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Dumping debug symbols.."
|
2016-02-04 17:45:53 +00:00
|
|
|
"./../../Libraries/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app.dSYM" > "$ReleasePath/$BinaryName.sym" 2>/dev/null
|
2016-02-04 12:44:39 +00:00
|
|
|
echo "Done!"
|
|
|
|
|
|
|
|
echo "Stripping the executable.."
|
|
|
|
strip "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName"
|
|
|
|
echo "Done!"
|
|
|
|
|
|
|
|
echo "Signing the application.."
|
|
|
|
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
|
|
|
|
codesign --force --deep --sign "Developer ID Application: John Preston" "$ReleasePath/$BinaryName.app"
|
|
|
|
elif [ "$BuildTarget" == "macstore" ]; then
|
|
|
|
codesign --force --deep --sign "3rd Party Mac Developer Application: TELEGRAM MESSENGER LLP (6N38VWS5BX)" "$ReleasePath/$BinaryName.app" --entitlements "Telegram/Telegram Desktop.entitlements"
|
|
|
|
fi
|
|
|
|
echo "Done!"
|
|
|
|
|
2015-09-24 18:18:21 +00:00
|
|
|
AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'`
|
|
|
|
DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'`
|
2015-09-24 14:17:53 +00:00
|
|
|
if [ "$AppUUID" != "$DsymUUID" ]; then
|
|
|
|
echo "UUID of binary '$AppUUID' and dSYM '$DsymUUID' differ!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-09-24 18:18:21 +00:00
|
|
|
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Resources/Icon.icns" ]; then
|
2015-09-24 14:17:53 +00:00
|
|
|
echo "Icon.icns not found in Resources!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-09-24 18:18:21 +00:00
|
|
|
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" ]; then
|
|
|
|
echo "$BinaryName not found in MacOS!"
|
2015-09-24 14:17:53 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-09-24 18:18:21 +00:00
|
|
|
if [ ! -d "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" ]; then
|
|
|
|
echo "$BinaryName signature not found!"
|
2015-09-24 14:17:53 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2015-09-24 18:18:21 +00:00
|
|
|
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
|
|
|
|
if [ ! -f "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater" ]; then
|
|
|
|
echo "Updater not found in Frameworks!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
elif [ "$BuildTarget" == "macstore" ]; then
|
|
|
|
if [ ! -f "$ReleasePath/$BinaryName.pkg" ]; then
|
|
|
|
echo "$BinaryName.pkg not found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
2015-09-24 14:17:53 +00:00
|
|
|
fi
|
|
|
|
|
2016-02-04 12:44:39 +00:00
|
|
|
SymbolsHash=`head -n 1 "$ReleasePath/$BinaryName.sym" | awk -F " " 'END {print $4}'`
|
|
|
|
echo "Copying $BinaryName.sym to $DropboxSymbolsPath/$BinaryName/$SymbolsHash"
|
|
|
|
mkdir -p "$DropboxSymbolsPath/$BinaryName/$SymbolsHash"
|
|
|
|
cp "$ReleasePath/$BinaryName.sym" "$DropboxSymbolsPath/$BinaryName/$SymbolsHash/"
|
|
|
|
echo "Done!"
|
|
|
|
|
2015-09-24 18:18:21 +00:00
|
|
|
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
|
2015-12-03 18:16:34 +00:00
|
|
|
if [ "$BetaVersion" == "0" ]; then
|
|
|
|
cd "$ReleasePath"
|
|
|
|
temppath=`hdiutil attach -readwrite tsetup.dmg | awk -F "\t" 'END {print $3}'`
|
|
|
|
cp -R "./$BinaryName.app" "$temppath/"
|
|
|
|
bless --folder "$temppath/" --openfolder "$temppath/"
|
|
|
|
hdiutil detach "$temppath"
|
|
|
|
hdiutil convert tsetup.dmg -format UDZO -imagekey zlib-level=9 -ov -o "$SetupFile"
|
|
|
|
cd "./../../Telegram"
|
|
|
|
fi
|
2015-12-03 19:22:40 +00:00
|
|
|
cd "$ReleasePath" && "./Packer.app/Contents/MacOS/Packer" -path "$BinaryName.app" -version $VersionForPacker $DevParam && cd "$HomePath"
|
2015-12-03 18:16:34 +00:00
|
|
|
echo "Packer done!"
|
|
|
|
|
|
|
|
if [ "$BetaVersion" != "0" ]; then
|
|
|
|
if [ ! -f "$ReleasePath/$BetaKeyFile" ]; then
|
|
|
|
echo "Beta version key file not found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
|
|
|
BetaSignature="$line"
|
|
|
|
done < "$ReleasePath/$BetaKeyFile"
|
|
|
|
|
2015-12-03 19:22:40 +00:00
|
|
|
UpdateFile="${UpdateFile}_${BetaSignature}"
|
|
|
|
SetupFile="tbeta${BetaVersion}_${BetaSignature}.zip"
|
2015-12-03 18:16:34 +00:00
|
|
|
fi
|
2015-09-24 18:18:21 +00:00
|
|
|
fi
|
2015-09-24 14:17:53 +00:00
|
|
|
|
|
|
|
if [ ! -d "$ReleasePath/deploy" ]; then
|
|
|
|
mkdir "$ReleasePath/deploy"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "$ReleasePath/deploy/$AppVersionStrMajor" ]; then
|
|
|
|
mkdir "$ReleasePath/deploy/$AppVersionStrMajor"
|
|
|
|
fi
|
|
|
|
|
2015-09-24 18:18:21 +00:00
|
|
|
if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then
|
|
|
|
echo "Copying $BinaryName.app and $UpdateFile to deploy/$AppVersionStrMajor/$AppVersionStr..";
|
|
|
|
mkdir "$DeployPath"
|
|
|
|
mkdir "$DeployPath/Telegram"
|
2015-12-03 18:16:34 +00:00
|
|
|
cp -r "$ReleasePath/$BinaryName.app" "$DeployPath/Telegram/"
|
|
|
|
if [ "$BetaVersion" != "0" ]; then
|
2015-12-04 10:20:36 +00:00
|
|
|
cd "$DeployPath" && zip -r "$SetupFile" "Telegram" && mv "$SetupFile" "./../../../" && cd "./../../../$HomePath"
|
2015-12-03 18:16:34 +00:00
|
|
|
mv "$ReleasePath/$BetaKeyFile" "$DeployPath/"
|
|
|
|
fi
|
|
|
|
mv "$ReleasePath/$BinaryName.app.dSYM" "$DeployPath/"
|
2015-09-24 18:18:21 +00:00
|
|
|
rm "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName"
|
|
|
|
rm "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater"
|
|
|
|
rm -rf "$ReleasePath/$BinaryName.app/Contents/_CodeSignature"
|
2015-12-03 18:16:34 +00:00
|
|
|
mv "$ReleasePath/$UpdateFile" "$DeployPath/"
|
|
|
|
mv "$ReleasePath/$SetupFile" "$DeployPath/"
|
2015-09-24 18:18:21 +00:00
|
|
|
|
|
|
|
if [ "$BuildTarget" == "mac32" ]; then
|
|
|
|
ReleaseToPath="./../../../TBuild/tother/tmac32"
|
|
|
|
DeployToPath="$ReleaseToPath/$AppVersionStrMajor/$AppVersionStrFull"
|
|
|
|
if [ ! -d "$ReleaseToPath/$AppVersionStrMajor" ]; then
|
|
|
|
mkdir "$ReleaseToPath/$AppVersionStrMajor"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "$DeployToPath" ]; then
|
|
|
|
mkdir "$DeployToPath"
|
|
|
|
fi
|
|
|
|
|
2015-12-03 18:16:34 +00:00
|
|
|
cp -v "$DeployPath/$UpdateFile" "$DeployToPath/"
|
|
|
|
cp -v "$DeployPath/$SetupFile" "$DeployToPath/"
|
|
|
|
cp -rv "$DeployPath/$BinaryName.app.dSYM" "$DeployToPath/"
|
2015-12-04 16:09:20 +00:00
|
|
|
if [ "$BetaVersion" != "0" ]; then
|
|
|
|
cp -v "$DeployPath/$BetaKeyFile" "$DeployToPath/"
|
|
|
|
fi
|
2015-09-24 14:17:53 +00:00
|
|
|
fi
|
2015-09-24 18:18:21 +00:00
|
|
|
elif [ "$BuildTarget" == "macstore" ]; then
|
|
|
|
echo "Copying $BinaryName.app to deploy/$AppVersionStrMajor/$AppVersionStr..";
|
|
|
|
mkdir "$DeployPath"
|
2015-12-03 18:16:34 +00:00
|
|
|
cp -r "$ReleasePath/$BinaryName.app" "$DeployPath/"
|
|
|
|
mv "$ReleasePath/$BinaryName.pkg" "$DeployPath/"
|
|
|
|
mv "$ReleasePath/$BinaryName.app.dSYM" "$DeployPath/"
|
2015-09-24 18:18:21 +00:00
|
|
|
rm "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName"
|
|
|
|
rm -rf "$ReleasePath/$BinaryName.app/Contents/_CodeSignature"
|
|
|
|
|
2016-02-04 12:44:39 +00:00
|
|
|
mkdir -p "$DropboxDeployPath"
|
2015-09-24 18:18:21 +00:00
|
|
|
cp -v "$DeployPath/$BinaryName.app" "$DropboxDeployPath/"
|
|
|
|
cp -rv "$DeployPath/$BinaryName.app.dSYM" "$DropboxDeployPath/"
|
2015-09-24 14:17:53 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Version $AppVersionStrFull is ready!";
|