From 8fd9a9ab5d5334a908da669899992cffab67f56b Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Sat, 7 Nov 2020 17:15:37 -0500 Subject: [PATCH] travisci: add nightly release --- .travis.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4d3af4c612..a90912ac10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,14 +55,24 @@ jobs: then echo 'No tag pushed. Skipping release.' else - OWNER="$(echo "$TRAVIS_REPO_SLUG" | cut -f1 -d/)" - REPO="$(echo "$TRAVIS_REPO_SLUG" | cut -f2 -d/)" - START=$(echo $TRAVIS_TAG | cut -c2-) - END='## \[' - BODY=$(sed -n "1,/$START/d;/$END/q;p" CHANGELOG.md) - strip postgrest - tar cJf postgrest-$TRAVIS_TAG-osx.tar.xz postgrest - ghr -t $GITHUB_TOKEN -u $OWNER -r $REPO -b "$BODY"--replace $TRAVIS_TAG postgrest-$TRAVIS_TAG-osx.tar.xz + owner="$(echo "$TRAVIS_REPO_SLUG" | cut -f1 -d/)" + repo="$(echo "$TRAVIS_REPO_SLUG" | cut -f2 -d/)" + if test $TRAVIS_TAG = "nightly" + then + date=$(date +'%F') + sha=$(echo $TRAVIS_COMMIT | head -c7) + suffix=$date-$sha + strip postgrest + tar cJf postgrest-nightly-$suffix-osx.tar.xz postgrest + ghr -t $GITHUB_TOKEN -u $owner -r $repo --replace nightly postgrest-nightly-$suffix-osx.tar.xz + else + start=$TRAVIS_TAG + end='## \[' + body=$(sed -n "1,/$start/d;/$end/q;p" CHANGELOG.md) + strip postgrest + tar cJf postgrest-$TRAVIS_TAG-osx.tar.xz postgrest + ghr -t $GITHUB_TOKEN -u $owner -r $repo -b "$body"--replace $TRAVIS_TAG postgrest-$TRAVIS_TAG-osx.tar.xz + fi fi - name: Code Coverage