|
|
32f8ef |
#!/bin/bash
|
|
|
32f8ef |
|
|
|
32f8ef |
set -e
|
|
|
32f8ef |
|
|
|
cc5124 |
export IMAGE=build-debian-7
|
|
|
cc5124 |
export TASK=synfig-linux
|
|
|
cc5124 |
|
|
|
32f8ef |
OLDDIR=`pwd`
|
|
|
32f8ef |
BASE_DIR=$(cd `dirname "$0"`; pwd)
|
|
|
32f8ef |
cd "$OLDDIR"
|
|
|
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() {
|
|
|
26f5ff |
export SCRIPT=$1
|
|
|
26f5ff |
export PLATFORM=$2
|
|
|
26f5ff |
export PLATFORM_SUFFIX=${ARCH}bit
|
|
|
32f8ef |
|
|
|
32f8ef |
echo ""
|
|
|
32f8ef |
echo "Update synfigstudio for $PLATFORM_SUFFIX"
|
|
|
32f8ef |
echo ""
|
|
|
32f8ef |
|
|
|
cc5124 |
$SCRIPT /build/script/common/manager.sh update synfigetl-master
|
|
|
cc5124 |
$SCRIPT /build/script/common/manager.sh update synfigcore-master
|
|
|
cc5124 |
$SCRIPT /build/script/common/manager.sh update synfigstudio-master
|
|
|
cc5124 |
$SCRIPT /build/script/common/manager.sh 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
|
|
|
32f8ef |
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 |
|
|
|
9051fb |
if [ -z "$1" ] || [ -z "$2" ]; then
|
|
|
cc5124 |
export ARCH=64
|
|
|
cc5124 |
run "$BASE_DIR/docker/run.sh" "linux-x64"
|
|
|
cc5124 |
export ARCH=32
|
|
|
cc5124 |
run "$BASE_DIR/docker/run.sh" "linux-i386"
|
|
|
9051fb |
else
|
|
|
cc5124 |
export ARCH=$2
|
|
|
cc5124 |
run "$BASE_DIR/docker/run.sh" "$1"
|
|
|
9051fb |
fi
|