move Sentry API call from .travis.yml
to release.sh
(#1837)
This commit is contained in:
parent
de44d36fb7
commit
3555556855
1
.gitignore
vendored
1
.gitignore
vendored
@ -15,6 +15,7 @@ tests/py/fixtures/TestTranslations.yml
|
||||
.idea/
|
||||
payday-*.txt*
|
||||
payday.pid
|
||||
.sentry-token
|
||||
|
||||
# Elastic Beanstalk Files
|
||||
.elasticbeanstalk/*
|
||||
|
16
.travis.yml
16
.travis.yml
@ -19,22 +19,6 @@ install:
|
||||
- if [ "${TRAVIS_BRANCH}" = "master" -a "${TRAVIS_PULL_REQUEST}" = "false" ]; then rm -rf .tox; fi
|
||||
- pip install tox "six>=1.14.0"
|
||||
before_script:
|
||||
- |
|
||||
version=$(python liberapay/version.py)
|
||||
if [ "${TRAVIS_BRANCH}" = "master" -a "${TRAVIS_PULL_REQUEST}" = "false" ] && [[ "$version" =~ ^[0-9]+$ ]]; then
|
||||
curl https://sentry.io/api/0/organizations/liberapay/releases/ \
|
||||
-X POST \
|
||||
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{
|
||||
"version": "'$version'",
|
||||
"refs": [{
|
||||
"repository": "liberapay/liberapay.com",
|
||||
"commit": "'$TRAVIS_COMMIT'"
|
||||
}],
|
||||
"projects": ["liberapaycom"]
|
||||
}'
|
||||
fi
|
||||
- psql -U postgres -c 'CREATE DATABASE liberapay_tests;'
|
||||
- DATABASE_URL=liberapay_tests ./recreate-schema.sh test
|
||||
- if [ "${TRAVIS_BRANCH}" = "master" -a "${TRAVIS_PULL_REQUEST}" = "false" ]; then rm -rfv tests/py/fixtures; export LIBERAPAY_I18N_TEST=yes; fi
|
||||
|
21
release.sh
21
release.sh
@ -39,6 +39,13 @@ require () {
|
||||
require eb
|
||||
require git
|
||||
|
||||
# Check that we have the required credentials
|
||||
sentry_token="$(cat .sentry-token 2>/dev/null || true)"
|
||||
if [ -z "$sentry_token" ]; then
|
||||
echo "The Sentry API token is missing, please put it in the '.sentry-token' file (in the same directory as this script)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Make sure we have the latest master
|
||||
git checkout -q master
|
||||
git pull
|
||||
@ -161,3 +168,17 @@ fi
|
||||
# Push to GitHub
|
||||
git push
|
||||
git push --tags
|
||||
|
||||
# Tell Sentry about this release
|
||||
curl https://sentry.io/api/0/organizations/liberapay/releases/ \
|
||||
-X POST \
|
||||
-H "Authorization: Bearer $sentry_token" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"version": "'$version'",
|
||||
"refs": [{
|
||||
"repository": "liberapay/liberapay.com",
|
||||
"commit": "'$(git rev-list -n 1 $version)'"
|
||||
}],
|
||||
"projects": ["liberapaycom"]
|
||||
}'
|
||||
|
Loading…
x
Reference in New Issue
Block a user