Skip to content

Commit

Permalink
Update deploy script for GitHub. Cleanup Travis debug.
Browse files Browse the repository at this point in the history
  • Loading branch information
wnjj committed May 25, 2021
1 parent 98920ce commit e2d6e23
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
5 changes: 1 addition & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ ext {

version = fullVersion

System.out.println("DEBUG TEST_TOKEN:" + System.getenv("TEST_TOKEN"))
System.out.println("DEBUG HIDDEN_TOKEN:" + System.getenv("HIDDEN_TOKEN"))

// Just printing out the SAGETV build version for informational purposes
// System.out.println("SAGETV VERSION ${versionArch}");

Expand Down Expand Up @@ -488,7 +485,7 @@ linuxRunServer.doFirst {
//
githubRelease
{
token System.getenv("OPENSAGETV_TOKEN")
token System.getenv("OPENSAGETV_TOKEN") ?: 'null'
owner "OpenSageTV"
repo "sagetv-linux"
tagName "${version}"
Expand Down
28 changes: 11 additions & 17 deletions build/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@
#

# Will read the last git commit message and if that message contains '[ci release]' then this script will
# push to Bintray as a release, tagging the release with the version tag
# push to GitHub as a release, tagging the release with the version tag
# eg, if the message was "Updated release version [ci release]"
# then this script push the release to Bintray AFTER a successful build that is NOT a pull request.
# then this script push the release to GitHub AFTER a successful build that is NOT a pull request.
# It will then git tag the release with the VERSION tag and then push that tag to github.

# Secure Environment Requirements
# BINTRAY_USER : For releasing
# BINTRAY_API : For releasing
# GITHUB_KEY : For tagging (if empty then tagging will not be done)
# GITHUB_USER : For tagging
# GITHUB_EMAIL : For tagging
# OPENSAGETV_TOKEN : For releasing
# GITHUB_KEY : For tagging (if empty then tagging will not be done)
# GITHUB_USER : For tagging
# GITHUB_EMAIL : For tagging

# Just exit if we are pull request
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
Expand Down Expand Up @@ -59,22 +58,17 @@ else
echo "Version ${VERSION} Appears to be OK"
fi

if [ -z "${BINTRAY_API}" ] ; then
echo "Deploy Failed! BINTRAY_API not set"
if [ -z "${OPENSAGETV_TOKEN}" ] ; then
echo "Deploy Failed! OPENSAGETV_TOKEN not set"
exit 1
fi

if [ -z "${BINTRAY_USER}" ] ; then
echo "Deploy Failed! BINTRAY_USER not set"
exit 1
fi

echo "Uploading ${VERSION} to Bintray"
echo "Uploading ${VERSION} to GitHub"
if [ -e ../build.gradle ] ; then
cd ..
fi
./gradlew bintrayUpload || { echo "Upload Failed for ${VERSION}" ; exit 1 ; }
echo "SageTV version ${VERSION} uploaded to Bintray"
./gradlew githubRelease || { echo "Upload Failed for ${VERSION}" ; exit 1 ; }
echo "SageTV version ${VERSION} uploaded to GitHub OpenSageTV"

# if we have github key configured that now tag and push this release
if [ ! -z "${GITHUB_KEY}" ] ; then
Expand Down

0 comments on commit e2d6e23

Please sign in to comment.