#!/bin/sh
# Exit immediately if a command exits with a non-zero status.
set -e
APPNAME=HeidiSQL
if [ ! -f "LICENSE" ]; then
echo Error: Current dir is not the root: `pwd`. Please run in repository root directory.
exit
fi
echo -n Enter major + minor version number to use \(e.g. "12.10"\):
read majorMinorVer
echo Reset local modifications and pull latest commits...
git clean -dfxq
git reset --hard
git pull
echo Detect full version...
buildRevision=`git log | grep -E "^commit\s" -c`
fullVer="$majorMinorVer.1.$buildRevision"
echo Full version: $fullVer
echo Pulling translations from Transifex...
extra/internationalization/tx pull -a
echo Compiling .po files to .mo files...
for f in $(find out -type f -iname '*.po'); do
langCode=`echo $f | sed -nE 's/.*\/(\w+)\/LC_MESSAGES\/.*$/\1/p'`
msgfmt -o "out/locale/heidisql.$langCode.mo" $f
done
echo Inject version string into .lpi file
#
sed -i "s/