diff --git a/build-all.sh b/build-all.sh new file mode 100755 index 0000000..03dc561 --- /dev/null +++ b/build-all.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +OLDDIR=`pwd` +BASE_DIR=$(cd `dirname "$0"`; pwd) +cd "$OLDDIR" + +"$BASE_DIR/update-opentoonz.sh" +"$BASE_DIR/update-synfigstudio.sh" diff --git a/build-opentoonz-linux.sh b/build-opentoonz-linux.sh new file mode 100755 index 0000000..b00bb08 --- /dev/null +++ b/build-opentoonz-linux.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +set -e + +export IMAGE=build-debian-7 +export TASK=opentoonz-linux + +OLDDIR=`pwd` +BASE_DIR=$(cd `dirname "$0"`; pwd) +BASE_DIR=`dirname "$BASE_DIR"` +cd "$OLDDIR" +DATA_DIR="$BASE_DIR/docker-builder-data" +BUILD_DIR=$DATA_DIR/build +PUBLISH_DIR=$BASE_DIR/publish + +CONFIG_FILE="$BASE_DIR/config.sh" +PACKET_BUILD_DIR="$BUILD_DIR/packet" +SCRIPT_BUILD_DIR="$BUILD_DIR/script" +if [ -f $CONFIG_FILE ]; then + source $CONFIG_FILE +fi + +run() { + export SCRIPT=$1 + export PLATFORM=$2 + export PLATFORM_SUFFIX=${ARCH}bit + + echo "" + echo "Update opentoonz for $PLATFORM_SUFFIX" + echo "" + + sudo $SCRIPT /build/script/common/manager.sh update opentoonz-master + sudo $SCRIPT /build/script/common/manager.sh clean_before_do install_release opentoonz-appimage + local DIR="$PACKET_BUILD_DIR/$PLATFORM/opentoonz-appimage/install_release" + local VERSION_FILE="$PACKET_BUILD_DIR/$PLATFORM/opentoonz-appimage/envdeps_release/version-opentoonz-master" + local VERSION=`cat "$VERSION_FILE" | cut -d'-' -f 1` + local COMMIT=`cat "$VERSION_FILE" | cut -d'-' -f 2-` + COMMIT="${COMMIT:0:5}" + local DATE=`date -u +%Y.%m.%d` + if [ -z "$COMMIT" ]; then + echo "Cannot find version, pheraps appimage not ready. Cancel." + return 1 + fi + if ! ls $PUBLISH_DIR/OpenToonz-$VERSION-*-$COMMIT-$PLATFORM_SUFFIX.appimage 1> /dev/null 2>&1; then + echo "Publish new version $VERSION-$COMMIT-$PLATFORM_SUFFIX" + rm -f $PUBLISH_DIR/OpenToonz-*-$PLATFORM_SUFFIX.appimage + cp $DIR/opentoonz.appimage $PUBLISH_DIR/OpenToonz-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage + if [ -f "$PUBLISH_DIR/publish-opentoonz.sh" ]; then + "$PUBLISH_DIR/publish-opentoonz.sh" "$PUBLISH_DIR/OpenToonz-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage" + fi + else + echo "Version $VERSION-$COMMIT-$PLATFORM_SUFFIX already published" + fi +} + +if [ -z "$1" ] || [ -z "$2" ]; then +export ARCH=64 +run "$BASE_DIR/docker/run.sh" "linux-x64" +export ARCH=32 +run "$BASE_DIR/docker/run.sh" "linux-i386" +else +export ARCH=$2 +run "$BASE_DIR/docker/run.sh" "$1" +fi diff --git a/build-synfigstudio-linux.sh b/build-synfigstudio-linux.sh new file mode 100755 index 0000000..db3cb99 --- /dev/null +++ b/build-synfigstudio-linux.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +set -e + +export IMAGE=build-debian-7 +export TASK=synfig-linux + +OLDDIR=`pwd` +BASE_DIR=$(cd `dirname "$0"`; pwd) +BASE_DIR=`dirname "$BASE_DIR"` +cd "$OLDDIR" +DATA_DIR="$BASE_DIR/docker-builder-data" +BUILD_DIR=$DATA_DIR/build +PUBLISH_DIR=$BASE_DIR/publish + +CONFIG_FILE="$BASE_DIR/config.sh" +PACKET_BUILD_DIR="$BUILD_DIR/packet" +SCRIPT_BUILD_DIR="$BUILD_DIR/script" +if [ -f $CONFIG_FILE ]; then + source $CONFIG_FILE +fi + +run() { + export SCRIPT=$1 + export PLATFORM=$2 + export PLATFORM_SUFFIX=${ARCH}bit + + echo "" + echo "Update synfigstudio for $PLATFORM_SUFFIX" + echo "" + + $SCRIPT /build/script/common/manager.sh update synfigetl-master + $SCRIPT /build/script/common/manager.sh update synfigcore-master + $SCRIPT /build/script/common/manager.sh update synfigstudio-master + $SCRIPT /build/script/common/manager.sh clean_before_do install_release synfigstudio-appimage + local DIR="$PACKET_BUILD_DIR/$PLATFORM/synfigstudio-appimage/install_release" + local VERSION_FILE="$PACKET_BUILD_DIR/$PLATFORM/synfigstudio-appimage/envdeps_release/version-synfigstudio-master" + local VERSION=`cat "$VERSION_FILE" | cut -d'-' -f 1` + local COMMIT=`cat "$VERSION_FILE" | cut -d'-' -f 2-` + COMMIT="${COMMIT:0:5}" + local DATE=`date -u +%Y.%m.%d` + if [ -z "$COMMIT" ]; then + echo "Cannot find version, pheraps appimage not ready. Cancel." + return 1 + fi +if ! ls $PUBLISH_DIR/SynfigStudio-$VERSION-*-$COMMIT-$PLATFORM_SUFFIX.appimage 1> /dev/null 2>&1; then + echo "Publish new version $VERSION-$COMMIT-$PLATFORM_SUFFIX" + rm -f $PUBLISH_DIR/SynfigStudio-*-$PLATFORM_SUFFIX.appimage + cp $DIR/synfigstudio.appimage $PUBLISH_DIR/SynfigStudio-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage + if [ -f "$PUBLISH_DIR/publish-synfigstudio.sh" ]; then + "$PUBLISH_DIR/publish-synfigstudio.sh" "$PUBLISH_DIR/SynfigStudio-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage" + fi + else + echo "Version $VERSION-$COMMIT-$PLATFORM_SUFFIX already published" + fi +} + +if [ -z "$1" ] || [ -z "$2" ]; then +export ARCH=64 +run "$BASE_DIR/docker/run.sh" "linux-x64" +export ARCH=32 +run "$BASE_DIR/docker/run.sh" "linux-i386" +else +export ARCH=$2 +run "$BASE_DIR/docker/run.sh" "$1" +fi diff --git a/build-synfigstudio-win.sh b/build-synfigstudio-win.sh new file mode 100755 index 0000000..73672d8 --- /dev/null +++ b/build-synfigstudio-win.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +set -e + +export IMAGE=build-fedora-cross-win +export TASK=synfig-linux + +OLDDIR=`pwd` +BASE_DIR=$(cd `dirname "$0"`; pwd) +BASE_DIR=`dirname "$BASE_DIR"` +cd "$OLDDIR" +DATA_DIR="$BASE_DIR/docker-builder-data" +BUILD_DIR=$DATA_DIR/build +PUBLISH_DIR=$BASE_DIR/publish + +CONFIG_FILE="$BASE_DIR/config.sh" +PACKET_BUILD_DIR="$BUILD_DIR/packet" +SCRIPT_BUILD_DIR="$BUILD_DIR/script" +if [ -f $CONFIG_FILE ]; then + source $CONFIG_FILE +fi + +run() { + export SCRIPT="$BASE_DIR/docker/run.sh" + export PLATFORM=win-${ARCH} + export PLATFORM_SUFFIX=${ARCH}bit + + echo "" + echo "Update synfigstudio for ${PLATFORM}" + echo "" + + $SCRIPT /build/script/common/manager.sh update synfigstudio-master + # QUICK HACK: + $SCRIPT /build/packet/${PLATFORM}/synfigstudio-master/download/synfig/autobuild/fedora-crosscompile-win.sh + local DIR="$PACKET_BUILD_DIR/$PLATFORM/synfigstudio-appimage/install_release" + local VERSION_FILE="$PACKET_BUILD_DIR/$PLATFORM/synfigstudio-appimage/envdeps_release/version-synfigstudio-master" + local VERSION=`cat "$VERSION_FILE" | cut -d'-' -f 1` + local COMMIT=`cat "$VERSION_FILE" | cut -d'-' -f 2-` + COMMIT="${COMMIT:0:5}" + local DATE=`date -u +%Y.%m.%d` + if [ -z "$COMMIT" ]; then + echo "Cannot find version, pheraps appimage not ready. Cancel." + return 1 + fi +if ! ls $PUBLISH_DIR/SynfigStudio-$VERSION-*-$COMMIT-$PLATFORM_SUFFIX.appimage 1> /dev/null 2>&1; then + echo "Publish new version $VERSION-$COMMIT-$PLATFORM_SUFFIX" + rm -f $PUBLISH_DIR/SynfigStudio-*-$PLATFORM_SUFFIX.appimage + cp $DIR/synfigstudio.appimage $PUBLISH_DIR/SynfigStudio-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage + if [ -f "$PUBLISH_DIR/publish-synfigstudio.sh" ]; then + "$PUBLISH_DIR/publish-synfigstudio.sh" "$PUBLISH_DIR/SynfigStudio-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage" + fi + else + echo "Version $VERSION-$COMMIT-$PLATFORM_SUFFIX already published" + fi +} + +if [ -z "$1" ] || [ -z "$2" ]; then +export ARCH=64 +run +export ARCH=32 +run +else +export ARCH=$2 +run +fi diff --git a/publish/update-all.sh b/publish/update-all.sh deleted file mode 100755 index 03dc561..0000000 --- a/publish/update-all.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -OLDDIR=`pwd` -BASE_DIR=$(cd `dirname "$0"`; pwd) -cd "$OLDDIR" - -"$BASE_DIR/update-opentoonz.sh" -"$BASE_DIR/update-synfigstudio.sh" diff --git a/publish/update-opentoonz-linux.sh b/publish/update-opentoonz-linux.sh deleted file mode 100755 index b00bb08..0000000 --- a/publish/update-opentoonz-linux.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - -set -e - -export IMAGE=build-debian-7 -export TASK=opentoonz-linux - -OLDDIR=`pwd` -BASE_DIR=$(cd `dirname "$0"`; pwd) -BASE_DIR=`dirname "$BASE_DIR"` -cd "$OLDDIR" -DATA_DIR="$BASE_DIR/docker-builder-data" -BUILD_DIR=$DATA_DIR/build -PUBLISH_DIR=$BASE_DIR/publish - -CONFIG_FILE="$BASE_DIR/config.sh" -PACKET_BUILD_DIR="$BUILD_DIR/packet" -SCRIPT_BUILD_DIR="$BUILD_DIR/script" -if [ -f $CONFIG_FILE ]; then - source $CONFIG_FILE -fi - -run() { - export SCRIPT=$1 - export PLATFORM=$2 - export PLATFORM_SUFFIX=${ARCH}bit - - echo "" - echo "Update opentoonz for $PLATFORM_SUFFIX" - echo "" - - sudo $SCRIPT /build/script/common/manager.sh update opentoonz-master - sudo $SCRIPT /build/script/common/manager.sh clean_before_do install_release opentoonz-appimage - local DIR="$PACKET_BUILD_DIR/$PLATFORM/opentoonz-appimage/install_release" - local VERSION_FILE="$PACKET_BUILD_DIR/$PLATFORM/opentoonz-appimage/envdeps_release/version-opentoonz-master" - local VERSION=`cat "$VERSION_FILE" | cut -d'-' -f 1` - local COMMIT=`cat "$VERSION_FILE" | cut -d'-' -f 2-` - COMMIT="${COMMIT:0:5}" - local DATE=`date -u +%Y.%m.%d` - if [ -z "$COMMIT" ]; then - echo "Cannot find version, pheraps appimage not ready. Cancel." - return 1 - fi - if ! ls $PUBLISH_DIR/OpenToonz-$VERSION-*-$COMMIT-$PLATFORM_SUFFIX.appimage 1> /dev/null 2>&1; then - echo "Publish new version $VERSION-$COMMIT-$PLATFORM_SUFFIX" - rm -f $PUBLISH_DIR/OpenToonz-*-$PLATFORM_SUFFIX.appimage - cp $DIR/opentoonz.appimage $PUBLISH_DIR/OpenToonz-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage - if [ -f "$PUBLISH_DIR/publish-opentoonz.sh" ]; then - "$PUBLISH_DIR/publish-opentoonz.sh" "$PUBLISH_DIR/OpenToonz-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage" - fi - else - echo "Version $VERSION-$COMMIT-$PLATFORM_SUFFIX already published" - fi -} - -if [ -z "$1" ] || [ -z "$2" ]; then -export ARCH=64 -run "$BASE_DIR/docker/run.sh" "linux-x64" -export ARCH=32 -run "$BASE_DIR/docker/run.sh" "linux-i386" -else -export ARCH=$2 -run "$BASE_DIR/docker/run.sh" "$1" -fi diff --git a/publish/update-synfigstudio-linux.sh b/publish/update-synfigstudio-linux.sh deleted file mode 100755 index db3cb99..0000000 --- a/publish/update-synfigstudio-linux.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -set -e - -export IMAGE=build-debian-7 -export TASK=synfig-linux - -OLDDIR=`pwd` -BASE_DIR=$(cd `dirname "$0"`; pwd) -BASE_DIR=`dirname "$BASE_DIR"` -cd "$OLDDIR" -DATA_DIR="$BASE_DIR/docker-builder-data" -BUILD_DIR=$DATA_DIR/build -PUBLISH_DIR=$BASE_DIR/publish - -CONFIG_FILE="$BASE_DIR/config.sh" -PACKET_BUILD_DIR="$BUILD_DIR/packet" -SCRIPT_BUILD_DIR="$BUILD_DIR/script" -if [ -f $CONFIG_FILE ]; then - source $CONFIG_FILE -fi - -run() { - export SCRIPT=$1 - export PLATFORM=$2 - export PLATFORM_SUFFIX=${ARCH}bit - - echo "" - echo "Update synfigstudio for $PLATFORM_SUFFIX" - echo "" - - $SCRIPT /build/script/common/manager.sh update synfigetl-master - $SCRIPT /build/script/common/manager.sh update synfigcore-master - $SCRIPT /build/script/common/manager.sh update synfigstudio-master - $SCRIPT /build/script/common/manager.sh clean_before_do install_release synfigstudio-appimage - local DIR="$PACKET_BUILD_DIR/$PLATFORM/synfigstudio-appimage/install_release" - local VERSION_FILE="$PACKET_BUILD_DIR/$PLATFORM/synfigstudio-appimage/envdeps_release/version-synfigstudio-master" - local VERSION=`cat "$VERSION_FILE" | cut -d'-' -f 1` - local COMMIT=`cat "$VERSION_FILE" | cut -d'-' -f 2-` - COMMIT="${COMMIT:0:5}" - local DATE=`date -u +%Y.%m.%d` - if [ -z "$COMMIT" ]; then - echo "Cannot find version, pheraps appimage not ready. Cancel." - return 1 - fi -if ! ls $PUBLISH_DIR/SynfigStudio-$VERSION-*-$COMMIT-$PLATFORM_SUFFIX.appimage 1> /dev/null 2>&1; then - echo "Publish new version $VERSION-$COMMIT-$PLATFORM_SUFFIX" - rm -f $PUBLISH_DIR/SynfigStudio-*-$PLATFORM_SUFFIX.appimage - cp $DIR/synfigstudio.appimage $PUBLISH_DIR/SynfigStudio-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage - if [ -f "$PUBLISH_DIR/publish-synfigstudio.sh" ]; then - "$PUBLISH_DIR/publish-synfigstudio.sh" "$PUBLISH_DIR/SynfigStudio-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage" - fi - else - echo "Version $VERSION-$COMMIT-$PLATFORM_SUFFIX already published" - fi -} - -if [ -z "$1" ] || [ -z "$2" ]; then -export ARCH=64 -run "$BASE_DIR/docker/run.sh" "linux-x64" -export ARCH=32 -run "$BASE_DIR/docker/run.sh" "linux-i386" -else -export ARCH=$2 -run "$BASE_DIR/docker/run.sh" "$1" -fi