forked from OmniSharp/omnisharp-roslyn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
73 lines (73 loc) · 2.78 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
69
70
71
72
73
language: csharp
sudo: required
dist: trusty
env:
global:
secure: m2PtYwYOhaK0uFMZ19ZxApZwWZeAIq1dS//jx/5I3txpIWD+TfycQMAWYxycFJ/GJkeVF29P4Zz1uyS2XKKjPJpp2Pds98FNQyDv3OftpLAVa0drsjfhurVlBmSdrV7GH6ncKfvhd+h7KVK5vbZc+NeR4dH7eNvN/jraS//AMJg=
mono:
- 4.6.0
os:
- linux
- osx
osx_image: xcode7.3
# install automaically retries
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install jq; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install openssl; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/; ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew list; fi
- ./build.sh -target=Restore
script:
- travis_retry ./build.sh -target=TravisTestAll
- ./build.sh -target=Travis -archive
addons:
apt:
packages:
- gettext
- libcurl4-openssl-dev
- libicu-dev
- libssl-dev
- libunwind8
- zlib1g
- curl
notifications:
slack:
rooms:
- omnisharp:U358j4McaEOIzFqXvGexVokC#general
on_success: change
on_failure: always
on_pull_requests: false
deploy:
provider: releases
api_key:
secure: N9hansErZKHl7G5Ed/hcBgwcvLuRjB7YAskAvSAYB+luacV6rSK7Vlm/4NyjaZCwWv5wOdBphle2S4yZLRDTdMwLrdQWwWYeZI60kE22c1amKJaf6j5ai2u/P3bt55klQ2yO2U/LacwHVoRtJlVdwSAXuDQ3zMd88VbBModQyxE=
file_glob: true
file: artifacts/package/*.tar.gz
skip_cleanup: true
on:
repo: OmniSharp/omnisharp-roslyn
tags: true
after_deploy: |
openssl enc -aes-256-cbc -a -salt -in travis_rsa.enc -out ~/.ssh/id_rsa -pass pass:$OPENSSL_PASSKEY -d
chmod 600 ~/.ssh/id_rsa
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
OMNISHARP_VERSION="1.0.0-dev";
if [ $TRAVIS_TAG ]; then
OMNISHARP_VERSION=${TRAVIS_TAG:1};
fi
BRANCH_NAME="upgrade/omnisharp-roslyn-$TRAVIS_TAG"
git config --global user.name "OmniSharp Bot"
git config --global user.email "omnisharp-bot@users.noreply.github.com"
git clone git@github.com:OmniSharp/omnisharp-node-client.git ~/omnisharp-node-client
pushd ~/omnisharp-node-client
git checkout -b $BRANCH_NAME
cat package.json > package2.json
cat package2.json | jq '."omnisharp-roslyn"="'$TRAVIS_TAG'"' > package.json
git add package.json
git commit -m "Update omnisharp-roslyn to $TRAVIS_TAG"
git push origin $BRANCH_NAME
curl -X POST -H 'Authorization: token '$GITHUB_API_TOKEN'' -d '{ "title": "Upgrade to OmniSharp/omnisharp-roslyn '$TRAVIS_TAG'", "body": "*Automated PR* - Upgrade omnisharp-roslyn to '$TRAVIS_TAG'. [release patch]", "head": "'$BRANCH_NAME'", "base": "master" }' https://api.github.com/repos/OmniSharp/omnisharp-node-client/pulls
fi