|
|
32f8ef |
#!/bin/bash
|
|
|
32f8ef |
|
|
|
32f8ef |
set -e
|
|
|
32f8ef |
|
|
|
32f8ef |
BASE_DIR=$(cd `dirname "$0"`; pwd)
|
|
|
32f8ef |
DATA_DIR="$BASE_DIR/docker-builder-data"
|
|
|
32f8ef |
BUILD_DIR=$DATA_DIR/build
|
|
|
32f8ef |
PUBLISH_DIR=$BASE_DIR/publish
|
|
|
32f8ef |
|
|
|
32f8ef |
CONFIG_FILE="$BASE_DIR/config.sh"
|
|
|
32f8ef |
PACKET_BUILD_DIR="$BUILD_DIR/packet"
|
|
|
32f8ef |
SCRIPT_BUILD_DIR="$BUILD_DIR/script"
|
|
|
32f8ef |
if [ -f $CONFIG_FILE ]; then
|
|
|
32f8ef |
source $CONFIG_FILE
|
|
|
32f8ef |
fi
|
|
|
32f8ef |
|
|
|
32f8ef |
run() {
|
|
|
8fa589 |
local SCRIPT=$1
|
|
|
8fa589 |
local PLATFORM=$2
|
|
|
8fa589 |
local PLATFORM_SUFFIX=$3
|
|
|
32f8ef |
|
|
|
32f8ef |
echo ""
|
|
|
32f8ef |
echo "Update synfigstudio for $PLATFORM_SUFFIX"
|
|
|
32f8ef |
echo ""
|
|
|
32f8ef |
|
|
|
8fa589 |
$SCRIPT update synfigetl-master
|
|
|
8fa589 |
$SCRIPT update synfigcore-master
|
|
|
8fa589 |
$SCRIPT update synfigstudio-master
|
|
|
8fa589 |
$SCRIPT clean_before_do install_release synfigstudio-appimage
|
|
|
32f8ef |
local DIR="$PACKET_BUILD_DIR/$PLATFORM/synfigstudio-appimage/install_release"
|
|
|
32f8ef |
local VERSION_FILE="$PACKET_BUILD_DIR/$PLATFORM/synfigstudio-appimage/envdeps_release/version-synfigstudio-master"
|
|
|
32f8ef |
local VERSION=`cat "$VERSION_FILE" | cut -d'-' -f 1`
|
|
|
32f8ef |
local COMMIT=`cat "$VERSION_FILE" | cut -d'-' -f 2-`
|
|
|
32f8ef |
COMMIT="${COMMIT:0:5}"
|
|
|
32f8ef |
local DATE=`date -u +%Y.%m.%d`
|
|
|
32f8ef |
if [ -z "$COMMIT" ]; then
|
|
|
32f8ef |
echo "Cannot find version, pheraps appimage not ready. Cancel."
|
|
|
32f8ef |
return 1
|
|
|
32f8ef |
fi
|
|
|
8fa589 |
if ! ls $PUBLISH_DIR/SynfigStudio-$VERSION-*-$COMMIT-$PLATFORM_SUFFIX.appimage 1> /dev/null 2>&1; then
|
|
|
32f8ef |
echo "Publish new version $VERSION-$COMMIT-$PLATFORM_SUFFIX"
|
|
|
32f8ef |
rm -f $PUBLISH_DIR/SynfigStudio-*-$PLATFORM_SUFFIX.appimage
|
|
|
32f8ef |
cp $DIR/synfigstudio.appimage $PUBLISH_DIR/SynfigStudio-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage
|
|
|
32f8ef |
if [ -f "$PUBLISH_DIR/publish-synfigstudio.sh" ]; then
|
|
|
32f8ef |
"$PUBLISH_DIR/publish-synfigstudio.sh" "$PUBLISH_DIR/SynfigStudio-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage"
|
|
|
32f8ef |
fi
|
|
|
32f8ef |
else
|
|
|
32f8ef |
echo "Version $VERSION-$COMMIT-$PLATFORM_SUFFIX already published"
|
|
|
32f8ef |
fi
|
|
|
32f8ef |
}
|
|
|
32f8ef |
|
|
|
8fa589 |
run "$BASE_DIR/docker/debian-7-64bit/run.sh" "linux-x64" "64bits"
|
|
|
8fa589 |
run "$BASE_DIR/docker/debian-7-32bit/run.sh" "linux-i386" "32bits"
|