Skip to content

Commit e68f05f

Browse files
committed
Add Script for deployment in travis
1 parent aa96746 commit e68f05f

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

.travis.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
11
language: java
22
jdk:
3-
- openjdk8
3+
- openjdk8
4+
script:
5+
- mvn clean test
6+
7+
cache:
8+
directories:
9+
- $HOME/.m2
10+
11+
deploy:
12+
provider: script
13+
script: .travis/release.sh
14+
skip_cleanup: true
15+
on:
16+
tags: true
17+
jdk: openjdk8

.travis/release.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
echo "Ensuring that pom matches $TRAVIS_TAG"
6+
mvn org.codehaus.mojo:versions-maven-plugin:2.7:set -DnewVersion=$TRAVIS_TAG
7+
8+
echo "Uploading"
9+
mvn deploy --settings .travis/settings.xml -DskipTests=true --batch-mode --update-snapshots -Prelease

.travis/settings.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
<servers>
6+
<server>
7+
<id>bintray-bliblidotcom-maven</id>
8+
<username>${env.BINTRAY_USERNAME}</username>
9+
<password>${env.BINTRAY_PASSWORD}</password>
10+
</server>
11+
</servers>
12+
13+
</settings>

0 commit comments

Comments
 (0)