-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (35 loc) · 1.28 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
language: generic
notifications:
email: false
branches:
only:
- master
# Environment variables
env:
global:
- MODNAME: ModItemTooltips
- Deploy: no
script:
- pwd
- ls
- git tag
- cd $TRAVIS_BUILD_DIR
- ls
- export version=`curl http://javid.ddns.net/tModLoader/tools/latestmodversionsimple.php?modname=$MODNAME`
- echo "Mod Browser version is $version"
- export gitVersion=`git describe --abbrev=0 --tags`
- echo "git version is $gitVersion"
- if [[ "$version" = "$gitVersion" ]]; then echo "Version does match, no need to push release"; Deploy=no; else echo "Version does not match, need to push release"; git config --global user.email "builds@travis-ci.com"; git config --global user.name "Travis CI"; git tag $version -a -m "TravisCI Autogenerated Release"; git push --quiet https://$GH_REPO_TOKEN@github.com/Jofairden/ModItemTooltips $version > /dev/null 2>&1; Deploy=yes; fi
- echo $Deploy
before_deploy:
- wget -O $MODNAME.tmod http://javid.ddns.net/tModLoader/download.php?Down=mods/$MODNAME.tmod
- ls
# should only deploy if the script doesn't fail, meaning we have a new .tmod file to publish
deploy:
provider: releases
api_key: $GH_REPO_TOKEN
file: "$MODNAME.tmod"
skip_cleanup: true
on:
tags: false
condition: "$Deploy = yes"