Skip to content

Commit

Permalink
travisci: add nightly release
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-chavez committed Nov 11, 2020
1 parent 5f3b581 commit 8fd9a9a
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8fd9a9a

Please sign in to comment.