Skip to content

Commit

Permalink
Updated travis appimage deployment.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrd2 committed Jun 17, 2019
1 parent c77d339 commit 29109c3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ language: cpp

branches:
except:
- /^(?i:continuous)$/
- /^(?i:testing-)/
- /^(?i:continuous)/
- l10n_master

env:
Expand Down Expand Up @@ -102,12 +103,19 @@ matrix:
./appimagetool "$appdir/" -g
- |- # publish
if [[ ("$TRAVIS_BRANCH" != "$RELEASE_BRANCH" && "$TRAVIS_BRANCH" != "$TRAVIS_TAG") || "$TRAVIS_EVENT_TYPE" != "push" ]]; then
echo 'Uploading to transfer.sh...'
url=$(curl -H "Max-Days: 1" --upload-file Subtitle_Composer-x86_64.AppImage https://transfer.sh/Subtitle_Composer-x86_64.AppImage)
echo "AppImage uploaded to: $url"
#echo 'Uploading to transfer.sh...'
#url=$(curl -H "Max-Days: 1" --upload-file Subtitle_Composer-x86_64.AppImage https://transfer.sh/Subtitle_Composer-x86_64.AppImage)
#echo "AppImage uploaded to: $url"
export UPLOADTOOL_SUFFIX="$TRAVIS_BRANCH"
export UPLOADTOOL_BODY="Instructions on using AppImage can be found [here](https://github.com/maxrd2/subtitlecomposer/wiki/AppImage-HOWTO)\n\nThis is the ***$UPLOADTOOL_SUFFIX experimental build*** for testing new features.\n\nTravis CI build log: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID/"
bash "$TRAVIS_BUILD_DIR/pkg/misc/upload.sh" Subtitle_Composer-x86_64.AppImage*
elif [[ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ]]; then
echo 'Publishing release to GitHub...'
export UPLOADTOOL_BODY="Instructions on using AppImage can be found [here](https://github.com/maxrd2/subtitlecomposer/wiki/AppImage-HOWTO)\n\nThis is the ***latest development build***, below you can find stable release builds.\n\nTravis CI build log: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID/"
bash "$TRAVIS_BUILD_DIR/pkg/misc/upload.sh" Subtitle_Composer-x86_64.AppImage*
else
echo 'Publishing release to GitHub...'
export UPLOADTOOL_BODY="Instructions on using AppImage can be found [here](https://github.com/maxrd2/subtitlecomposer/wiki/AppImage-HOWTO)\n\nThis is the latest unstable build, below you can find stable release builds.\n\nTravis CI build log: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID/"
export UPLOADTOOL_BODY="Instructions on using AppImage can be found [here](https://github.com/maxrd2/subtitlecomposer/wiki/AppImage-HOWTO)\n\nThis is the ***release $TRAVIS_TAG stable build***.\n\nTravis CI build log: https://travis-ci.org/$TRAVIS_REPO_SLUG/builds/$TRAVIS_BUILD_ID/"
bash "$TRAVIS_BUILD_DIR/pkg/misc/upload.sh" Subtitle_Composer-x86_64.AppImage*
fi
Expand Down
16 changes: 5 additions & 11 deletions pkg/misc/upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,17 @@ fi
# builds for other branches.
# If this build was triggered by a tag, call the result a Release
if [ ! -z "$UPLOADTOOL_SUFFIX" ] ; then
if [ "$UPLOADTOOL_SUFFIX" = "$TRAVIS_TAG" ] ; then
RELEASE_NAME="$TRAVIS_TAG"
RELEASE_TITLE="Release ($TRAVIS_TAG)"
is_prerelease="false"
else
RELEASE_NAME="continuous-$UPLOADTOOL_SUFFIX"
RELEASE_TITLE="Latest git ($UPLOADTOOL_SUFFIX)"
is_prerelease="true"
fi
RELEASE_NAME="testing-$UPLOADTOOL_SUFFIX"
RELEASE_TITLE="Experimental Build - $UPLOADTOOL_SUFFIX branch"
is_prerelease="true"
else
if [ "$TRAVIS_TAG" != "" ]; then
RELEASE_NAME="$TRAVIS_TAG"
RELEASE_TITLE="Release build ($TRAVIS_TAG)"
RELEASE_TITLE="Release Build - $TRAVIS_TAG"
is_prerelease="false"
else
RELEASE_NAME="continuous" # Do not use "latest" as it is reserved by GitHub
RELEASE_TITLE="Latest git master"
RELEASE_TITLE="Latest Development Build - git master"
is_prerelease="true"
fi
fi
Expand Down

0 comments on commit 29109c3

Please sign in to comment.