Skip to content

Commit

Permalink
update sentry script
Browse files Browse the repository at this point in the history
  • Loading branch information
zema1 committed Dec 20, 2017
1 parent d9136f5 commit da929f8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ sudo: required
services:
- docker
env:
- CXX=g++-4.8
- USE_SENTRY=1
global:
- CXX=g++-4.8
matrix:
- USE_SENTRY=1
- USE_SENTRY=0
addons:
apt:
sources:
Expand Down Expand Up @@ -37,4 +40,4 @@ deploy:
tags: true

after_deploy:
- sh deploy/sentry_release.sh
- bash deploy/sentry_release.sh
2 changes: 0 additions & 2 deletions build/webpack.dll.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ const vendors = [
'codemirror/lib/codemirror.js',
'codemirror/mode/clike/clike.js',
'codemirror/mode/python/python.js',
'raven-js',
'raven-js/plugins/vue'
];

module.exports = {
Expand Down
8 changes: 5 additions & 3 deletions deploy/sentry_release.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/bin/sh
#!/bin/bash
DATE=`date +%Y%m%d`
COMMIT=`git rev-parse HEAD`
VERSION="$DATE-${COMMIT:0:5}"

echo "Current version is $VERSION"

if [ ! -z $USE_SENTRY ]; then
# create new release according to `VERSION`
docker run --rm -it -v $(pwd):/work getsentry/sentry-cli \
sentry-cli --auth-token 95c95811dcf14d4e9fdf2e63b9e027367b3bd1db91ab42a49e72648b7751ae6d releases -o onlinejudge -p onlinejudgefe $VERSION
sentry-cli --auth-token 95c95811dcf14d4e9fdf2e63b9e027367b3bd1db91ab42a49e72648b7751ae6d releases -o onlinejudge -p onlinejudgefe new $VERSION

# upload js and source_maps
docker run --rm -it -v $(pwd):/work getsentry/sentry-cli \
sentry-cli --auth-token 95c95811dcf14d4e9fdf2e63b9e027367b3bd1db91ab42a49e72648b7751ae6d releases -o onlinejudge -p onlinejudgefe files $VERSION upload-sourcemaps ./dist/static/js
sentry-cli --auth-token 95c95811dcf14d4e9fdf2e63b9e027367b3bd1db91ab42a49e72648b7751ae6d releases -o onlinejudge -p onlinejudgefe files $VERSION upload-sourcemaps ./dist/static/js
fi

0 comments on commit da929f8

Please sign in to comment.