forked from RPTools/maptool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (68 loc) · 1.89 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
language: java
sudo: false
matrix:
include:
- os: osx
osx_image: xcode10
install:
# Install Oracle JDK 10 and set as JAVA_HOME
- pwd
- cd ..
- mkdir java
- cd java
- wget http://maptool.craigs-stuff.net/java/jdk-10.0.2_osx-x64_bin.dmg
- MOUNTDEV=$(hdiutil mount jdk-10.0.2_osx-x64_bin.dmg | awk '/dev.disk/{print$1}')
- echo $MOUNTDEV
- MOUNTDIR="$(mount | grep JDK | awk '{$1=$2="";sub(" [(].*","");sub("^ ","");print}')"
- echo $MOUNTDIR
- sudo installer -pkg "${MOUNTDIR}/"*.pkg -target /
- hdiutil unmount "$MOUNTDIR"
- echo java home was $JAVA_HOME
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home
- echo java home is $JAVA_HOME
- export PATH=$JAVA_HOME/bin:$PATH
- echo $PATH
- cd ../maptool
- ./gradlew -version
- java -version
script:
- ./gradlew build
before_deploy:
# Install Sentry.io CLI
- curl -sL https://sentry.io/get-cli/ | bash
- sentry-cli info
- echo Version is $TRAVIS_TAG
# Create a Sentry release
- sentry-cli releases new "$TRAVIS_TAG"
# Create Deploy Artifacts
- ./gradlew deploy
deploy:
provider: releases
api_key: $GITHUB_RELEASE_KEY
file_glob: true
file: releases/release-*/*
overwrite: true
skip_cleanup: true
target_commitish: $TRAVIS_COMMIT
tag_name: $TRAVIS_TAG
draft: false
prerelease: true
on:
repo: $REPO
tags: true
all_branches: true
after_deploy:
# Finalize Sentry release
- sentry-cli releases finalize "$TRAVIS_TAG"
# Associate commits with the Sentry release
- sentry-cli releases set-commits "$TRAVIS_TAG" --auto
# Tell Sentry.io we have deployed a release
- sentry-cli releases deploys "$TRAVIS_TAG" new -e Production
after_success:
- wget $TRAVIS_DISCORD_WEBHOOK_SCRIPT_URL
- chmod +x send.sh
- ./send.sh success $DISCORD_URL
after_failure:
- wget $TRAVIS_DISCORD_WEBHOOK_SCRIPT_URL
- chmod +x send.sh
- ./send.sh failure $DISCORD_URL