2012-10-10 14:40:35 +02:00
|
|
|
#!/bin/bash
|
2015-10-23 16:40:36 +00:00
|
|
|
|
|
|
|
|
. $HOME/.profile
|
|
|
|
|
|
|
|
|
|
set -o pipefail # trace ERR through pipes
|
|
|
|
|
set -o errtrace # trace ERR through 'time command' and other functions
|
|
|
|
|
set -o nounset # set -u : exit the script if you try to use an uninitialized variable
|
|
|
|
|
set -o errexit # set -e : exit the script if any statement returns a non-true return value
|
|
|
|
|
|
|
|
|
|
error() {
|
|
|
|
|
local parent_lineno="$1"
|
|
|
|
|
if [[ "$#" = "3" ]] ; then
|
|
|
|
|
local message="$2"
|
|
|
|
|
local code="${3:-1}"
|
|
|
|
|
echo "Error on or near line ${parent_lineno}: ${message}; exiting with status ${code}"
|
|
|
|
|
else
|
|
|
|
|
local code="${2:-1}"
|
|
|
|
|
echo "Error on or near line ${parent_lineno}; exiting with status ${code}"
|
|
|
|
|
fi
|
|
|
|
|
rm -f *.tar.gz
|
|
|
|
|
rm -f *.zip
|
|
|
|
|
exit "${code}"
|
|
|
|
|
}
|
|
|
|
|
trap 'error ${LINENO}' ERR
|
|
|
|
|
|
|
|
|
|
|
2012-10-10 14:40:35 +02:00
|
|
|
version=$1
|
2016-02-08 14:51:01 +00:00
|
|
|
if [ $# -eq 2 ]; then
|
|
|
|
|
branch=$2
|
|
|
|
|
else
|
|
|
|
|
branch=master
|
|
|
|
|
fi
|
2012-10-10 14:40:35 +02:00
|
|
|
cd $(cat ~/.ofprojectgenerator/config)/scripts/dev
|
|
|
|
|
|
2016-02-08 14:51:01 +00:00
|
|
|
./create_package.sh linux $version $branch
|
|
|
|
|
./create_package.sh linux64 $version $branch
|
|
|
|
|
./create_package.sh linuxarmv6l $version $branch
|
|
|
|
|
./create_package.sh linuxarmv7l $version $branch
|
|
|
|
|
./create_package.sh msys2 $version $branch
|
|
|
|
|
./create_package.sh vs $version $branch
|
|
|
|
|
./create_package.sh ios $version $branch
|
|
|
|
|
./create_package.sh osx $version $branch
|
|
|
|
|
./create_package.sh android $version $branch
|
2016-01-31 21:35:32 +01:00
|
|
|
mkdir -p /var/www/versions/v${version}
|
2012-10-10 14:55:13 +02:00
|
|
|
mv *.tar.gz /var/www/versions/v${version}
|
|
|
|
|
mv *.zip /var/www/versions/v${version}
|
2012-10-10 14:40:35 +02:00
|
|
|
|
|
|
|
|
wget http://openframeworks.cc/release_hook.php?version=${version} -O /dev/null
|