-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4924e49
commit 9a4e906
Showing
5 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
|
||
os: | ||
- linux | ||
|
||
# run in container | ||
sudo: false | ||
|
||
# use framebuffer for UI | ||
before_install: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
|
||
env: | ||
global: | ||
# ENC_PWD | ||
- secure: "gKAzrngDxttmaZ5PM7zhlYmZOC9OGDc5vFhV3LZ3t+QRebQd+rZMrYqu71+BjlSbHM9Lp5Fj59yEjv5dkRPMbVdAVvQBK4pfBuOmrY5XJqqADDR63EI7QSiC7wzWP776mW7rb22DJKcyGf4FjnfDdXU9LENcmM2xMAjx0aNxL+A=" | ||
# GH_TOKEN | ||
- secure: "aMKCaSTnelmitm7ubPFPNzEsXMLsB/aa6ttycyHn3vNUtrfEdrvgK3rgTs6KPdwvvlCsh845GqHZjtcNh+q74Bn+R73JQRe2m+IHk61DFhEj1U78kB14rtALkN4pX32HgLonPpKwVxfnAUc1jGWsXsNlSV8rtGMto5gTcqVK9yM=" | ||
|
||
# publish artifacts and Javadoc after a successful build | ||
after_success: | ||
- travis/publish.sh | ||
|
||
before_deploy: | ||
- export VERSION=$(gradle -q getVersion) | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: "bpAttvhKOyYLTWJzQqBIGcCDZXC7ZV42D/OhztSDC1DDye5B2s1yNwwAvBvzftuiQUyHWG4Rr6o+Y0ZXdEuKPm8ABYqnaUDfEXuaP8mtKrVRB1np1NDY3MBCJalzBQe1/RHh7sm4zzvLWRndxaY76kmJA5gC5PMOtk3GDubIKmU=" | ||
file_glob: true | ||
file: | ||
- "build/libs/flowless-${VERSION}.jar" | ||
- "build/libs/flowless-${VERSION}-javadoc.jar" | ||
- "build/libs/flowless-${VERSION}-sources.jar" | ||
- "build/libs/flowless-fat-${VERSION}.jar" | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
branch: master | ||
repo: TomasMikula/Flowless |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,3 +53,7 @@ task fatJar(type: Jar, dependsOn: classes) { | |
} | ||
|
||
assemble.dependsOn fatJar | ||
|
||
task getVersion << { | ||
println version | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
if [ "$TRAVIS_REPO_SLUG" == "TomasMikula/Flowless" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then | ||
openssl aes-256-cbc -d -k "$ENC_PWD" -in gradle.properties.enc -out gradle.properties | ||
openssl aes-256-cbc -d -k "$ENC_PWD" -in secring.gpg.enc -out secring.gpg | ||
|
||
echo -e "Starting publish to Sonatype...\n" | ||
|
||
gradle uploadArchives | ||
RETVAL=$? | ||
|
||
if [ $RETVAL -eq 0 ]; then | ||
echo 'Publish completed!' | ||
else | ||
echo 'Publish failed.' | ||
return 1 | ||
fi | ||
|
||
# publish Javadoc for non-SNAPSHOT versions | ||
VERSION=$(gradle -q getVersion) | ||
if [[ $VERSION != *SNAPSHOT* ]]; then | ||
|
||
echo -e "Publishing javadoc...\n" | ||
|
||
git config --global user.email "travis@travis-ci.org" | ||
git config --global user.name "travis-ci" | ||
git config --global push.default simple | ||
git clone --quiet https://${GH_TOKEN}@github.com/FXMisc/fxmisc.github.io fxmisc | ||
|
||
cd fxmisc | ||
JAVADOC_DIR=./flowless/javadoc/$VERSION | ||
git rm -rf $JAVADOC_DIR | ||
cp -Rf ../build/docs/javadoc $JAVADOC_DIR | ||
git add -f $JAVADOC_DIR | ||
git commit -m "Javadoc for Flowless v$VERSION" | ||
git push | ||
|
||
fi | ||
|
||
fi |