-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
57 lines (56 loc) · 1.98 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
language: java
env:
global:
- DISPLAY=:99
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "export PLUGIN_VERSION=`grep '<version>' pom.xml -m 1 | cut -d'>' -f 2 | cut -d'<' -f 1`"
- "export IS_SNAPSHOT=`grep '<version>' pom.xml -m 1 | cut -d'>' -f 2 | cut -d'<' -f 1 | cut -d'-' -f 2`"
script: mvn clean verify
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
- $HOME/.gradle/
after_success:
- if [[ $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH == "master" ]]; then
mvn sonar:sonar -Dsonar.login=${SONAR_TOKEN} -Dsonar.projectKey="camel-lsp-client-eclipse" -Dsonar.projectName="Eclipse Client for Apache Camel Language Server";
fi
- if [[ $IS_SNAPSHOT == "SNAPSHOT" ]]; then
export DEPLOY_REPO_ROOT=nightly;
else
export DEPLOY_REPO_ROOT=stable;
fi
- mkdir com.github.camel-tooling.lsp.eclipse.updatesite/target/updatesite/
- mkdir com.github.camel-tooling.lsp.eclipse.updatesite/target/updatesite/${DEPLOY_REPO_ROOT}/
- mv com.github.camel-tooling.lsp.eclipse.updatesite/target/repository/* com.github.camel-tooling.lsp.eclipse.updatesite/target/updatesite/${DEPLOY_REPO_ROOT}/
- find website/* -name 'index.html' | xargs perl -pi -e "s/##VERSION##/${PLUGIN_VERSION}/g"
- find website/* -name 'index.html' | xargs perl -pi -e "s/##TYPE##/${DEPLOY_REPO_ROOT}/g"
- cp website/index.html com.github.camel-tooling.lsp.eclipse.updatesite/target/updatesite/${DEPLOY_REPO_ROOT}/
addons:
sonarcloud:
organization: "camel-tooling"
branches:
- master
deploy:
- provider: releases
api_key: ${DEPLOY_TOKEN}
file: com.github.camel-tooling.lsp.eclipse.updatesite/target/com.github.camel-tooling.eclipse.updatesite-${PLUGIN_VERSION}.zip
skip_cleanup: true
overwrite: true
on:
branch: master
- provider: script
script: bash .travis_publish
skip_cleanup: true
overwrite: true
on:
branch: master
- provider: script
script: bash .travis_publish
skip_cleanup: true
overwrite: true
on:
tags: true