|
|
cf6cd8 |
#!/bin/bash
|
|
|
cf6cd8 |
|
|
|
cf6cd8 |
set -e
|
|
|
cf6cd8 |
|
|
|
cf6cd8 |
export IMAGE=build-fedora-cross-win
|
|
|
cf6cd8 |
export TASK=synfig-linux
|
|
|
cf6cd8 |
|
|
|
cf6cd8 |
OLDDIR=`pwd`
|
|
|
cf6cd8 |
BASE_DIR=$(cd `dirname "$0"`; pwd)
|
|
|
cf6cd8 |
cd "$OLDDIR"
|
|
|
cf6cd8 |
DATA_DIR="$BASE_DIR/docker-builder-data"
|
|
|
cf6cd8 |
BUILD_DIR=$DATA_DIR/build
|
|
|
cf6cd8 |
PUBLISH_DIR=$BASE_DIR/publish
|
|
|
cf6cd8 |
|
|
|
cf6cd8 |
CONFIG_FILE="$BASE_DIR/config.sh"
|
|
|
cf6cd8 |
PACKET_BUILD_DIR="$BUILD_DIR/packet"
|
|
|
cf6cd8 |
SCRIPT_BUILD_DIR="$BUILD_DIR/script"
|
|
|
cf6cd8 |
if [ -f $CONFIG_FILE ]; then
|
|
|
cf6cd8 |
source $CONFIG_FILE
|
|
|
cf6cd8 |
fi
|
|
|
cf6cd8 |
|
|
|
cf6cd8 |
run() {
|
|
|
cf6cd8 |
export SCRIPT="$BASE_DIR/docker/run.sh"
|
|
|
cf6cd8 |
export PLATFORM=win-${ARCH}
|
|
|
cf6cd8 |
export PLATFORM_SUFFIX=${ARCH}bit
|
|
|
cf6cd8 |
|
|
|
cf6cd8 |
echo ""
|
|
|
cf6cd8 |
echo "Update synfigstudio for ${PLATFORM}"
|
|
|
cf6cd8 |
echo ""
|
|
|
cf6cd8 |
|
|
|
cf6cd8 |
$SCRIPT /build/script/common/manager.sh update synfigstudio-master
|
|
|
cf6cd8 |
# QUICK HACK:
|
|
|
cf6cd8 |
$SCRIPT /build/packet/${PLATFORM}/synfigstudio-master/download/synfig/autobuild/fedora-crosscompile-win.sh
|
|
|
e13458 |
#local DIR="$PACKET_BUILD_DIR/$PLATFORM/synfigstudio-appimage/install_release"
|
|
|
e13458 |
#local VERSION_FILE="$PACKET_BUILD_DIR/$PLATFORM/synfigstudio-appimage/envdeps_release/version-synfigstudio-master"
|
|
|
e13458 |
#local VERSION=`cat "$VERSION_FILE" | cut -d'-' -f 1`
|
|
|
e13458 |
#local COMMIT=`cat "$VERSION_FILE" | cut -d'-' -f 2-`
|
|
|
e13458 |
#COMMIT="${COMMIT:0:5}"
|
|
|
e13458 |
#local DATE=`date -u +%Y.%m.%d`
|
|
|
e13458 |
#if [ -z "$COMMIT" ]; then
|
|
|
e13458 |
# echo "Cannot find version, pheraps appimage not ready. Cancel."
|
|
|
e13458 |
# return 1
|
|
|
e13458 |
#fi
|
|
|
e13458 |
cd $PACKET_BUILD_DIR/$PLATFORM/synfigstudio-master/build
|
|
|
e13458 |
FILE=`ls -1 *.exe | head -n 1`
|
|
|
e13458 |
if ! ls $PUBLISH_DIR/${FILE} 1> /dev/null 2>&1; then
|
|
|
e13458 |
echo "Publish new version ${FILE}"
|
|
|
e13458 |
rm -f $PUBLISH_DIR/${FILE} || true
|
|
|
e13458 |
mv $PACKET_BUILD_DIR/$PLATFORM/synfigstudio-master/build/${FILE} $PUBLISH_DIR/
|
|
|
cf6cd8 |
if [ -f "$PUBLISH_DIR/publish-synfigstudio.sh" ]; then
|
|
|
e13458 |
"$PUBLISH_DIR/publish-synfigstudio.sh" "$PUBLISH_DIR/${FILE}"
|
|
|
cf6cd8 |
fi
|
|
|
cf6cd8 |
else
|
|
|
e13458 |
echo "Version ${FILE} already published"
|
|
|
cf6cd8 |
fi
|
|
|
cf6cd8 |
}
|
|
|
cf6cd8 |
|
|
|
cf6cd8 |
if [ -z "$1" ] || [ -z "$2" ]; then
|
|
|
cf6cd8 |
export ARCH=64
|
|
|
cf6cd8 |
run
|
|
|
cf6cd8 |
export ARCH=32
|
|
|
cf6cd8 |
run
|
|
|
cf6cd8 |
else
|
|
|
cf6cd8 |
export ARCH=$2
|
|
|
cf6cd8 |
run
|
|
|
cf6cd8 |
fi
|