diff --git a/build-synfigstudio-win.sh b/build-synfigstudio-win.sh index e99c711..5d03485 100755 --- a/build-synfigstudio-win.sh +++ b/build-synfigstudio-win.sh @@ -31,25 +31,27 @@ run() { $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 + #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 + cd $PACKET_BUILD_DIR/$PLATFORM/synfigstudio-master/build + FILE=`ls -1 *.exe | head -n 1` +if ! ls $PUBLISH_DIR/${FILE} 1> /dev/null 2>&1; then + echo "Publish new version ${FILE}" + rm -f $PUBLISH_DIR/${FILE} || true + mv $PACKET_BUILD_DIR/$PLATFORM/synfigstudio-master/build/${FILE} $PUBLISH_DIR/ if [ -f "$PUBLISH_DIR/publish-synfigstudio.sh" ]; then - "$PUBLISH_DIR/publish-synfigstudio.sh" "$PUBLISH_DIR/SynfigStudio-$VERSION-$DATE-$COMMIT-$PLATFORM_SUFFIX.appimage" + "$PUBLISH_DIR/publish-synfigstudio.sh" "$PUBLISH_DIR/${FILE}" fi else - echo "Version $VERSION-$COMMIT-$PLATFORM_SUFFIX already published" + echo "Version ${FILE} already published" fi }