Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Commit 166fd51

Browse files
authored
travis-0.8 (#657)
* setting up travis-0.8
1 parent 89055bf commit 166fd51

3 files changed

Lines changed: 49 additions & 0 deletions

File tree

.travis.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
language: java
2+
sudo: false
3+
env:
4+
- GPG_EXECUTABLE=gpg2
5+
before_install:
6+
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import --no-tty --batch --yes; fi
7+
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
8+
- echo "<settings><servers><server><id>mulesoft-releases</id><username>\${env.NEXUS_USER}</username><password>\${env.NEXUS_PASSWORD}</password></server><server><id>mulesoft-snapshots</id><username>\${env.NEXUS_USER}</username><password>\${env.NEXUS_PASSWORD}</password></server><server><id>ossrh</id><username>\${env.OSSRH_USER}</username><password>\${env.OSSRH_PASSWORD}</password></server></servers><profiles><profile><id>ossrh</id><activation><activeByDefault>true</activeByDefault></activation><properties><gpg.executable>\${env.GPG_EXECUTABLE}</gpg.executable><gpg.keyname>\${env.GPG_KEY_NAME}</gpg.keyname><gpg.passphrase>\${env.GPG_PASSPHRASE}</gpg.passphrase></properties></profile></profiles></settings>" > ~/settings.xml
9+
10+
install:
11+
- mvn install --settings ~/settings.xml -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B -V
12+
13+
deploy:
14+
# This provider handles pr merges to master and creates a SNAPSHOT
15+
- provider: script
16+
script: mvn deploy --settings ~/settings.xml -DskipTests -B -U
17+
skip_cleanup: true
18+
on:
19+
repo: raml-org/raml-java-parser
20+
all_branches: true
21+
condition: $TRAVIS_BRANCH =~ ^0.8.x$
22+
# This provider handles tags of version 0.8
23+
- provider: script
24+
script: bash scripts/release.sh $TRAVIS_TAG
25+
skip_cleanup: true
26+
on:
27+
repo: raml-org/raml-java-parser
28+
tags: true
29+
condition: $TRAVIS_TAG =~ ^0\.8\.[0-9]+$

pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
<exclude>**/*.xsd</exclude>
6767
<exclude>**/*.properties</exclude>
6868
<exclude>**/*.md</exclude>
69+
<exclude>private/**</exclude>
70+
<exclude>scripts/release.sh</exclude>
6971
<exclude>**/build-number.txt</exclude>
7072
</excludes>
7173
<mapping>

scripts/release.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
#Copyright 2016 (c) MuleSoft, Inc.
3+
#
4+
#Licensed under the Apache License, Version 2.0 (the "License");
5+
#you may not use this file except in compliance with the License.
6+
#You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
#Unless required by applicable law or agreed to in writing,
11+
#software distributed under the License is distributed on an
12+
#"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13+
#either express or implied. See the License for the specific
14+
#language governing permissions and limitations under the License.
15+
16+
TRAVIS_TAG=$1
17+
mvn --settings ~/settings.xml org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=$TRAVIS_TAG && \
18+
mvn clean deploy --settings ~/settings.xml -DskipTests=true -B -U

0 commit comments

Comments
 (0)