-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: .config/deploy-artifacts.sh .config/maven-settings.xml hipster-all/pom.xml hipster-core/pom.xml hipster-examples/pom.xml hipster-jung/pom.xml hipster-test/pom.xml pom.xml
- Loading branch information
Showing
199 changed files
with
9,559 additions
and
7,998 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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
#!/bin/bash | ||
|
||
echo "Auto-deploying artifacts..." | ||
echo "Auto-deploying Hipster artifacts..." | ||
echo "Current branch: $TRAVIS_BRANCH" | ||
|
||
if [ "$TRAVIS_REPO_SLUG" == "citiususc/hipster" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk7" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then | ||
echo "Running mvn deploy..." | ||
mvn deploy --settings .config/maven-settings.xml -DskipTests=true | ||
echo "Running mvn deploy, current directory: `pwd`" | ||
# Deploy to CITIUS | ||
#mvn --settings .config/maven-settings.xml -P citius-snapshot-deploy deploy -DskipTests=true | ||
# Deploy to Sonatype Nexus OSS | ||
mvn --settings .config/maven-settings.xml deploy -DskipTests=true | ||
else | ||
echo "Skipping deployment for this build..." | ||
echo "Skipping deployment for this build..." | ||
fi | ||
|
||
echo "Deployment script finished." | ||
echo "Deployment script finished." |
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,74 @@ | ||
#!/bin/bash | ||
|
||
#TRAVIS_REPO_SLUG="citiususc/hipster" | ||
#TRAVIS_JDK_VERSION="oraclejdk7" | ||
#TRAVIS_PULL_REQUEST="false" | ||
#TRAVIS_BRANCH="master" | ||
#HOME=`pwd` | ||
|
||
echo "Preparing Hipster site for auto-deploy" | ||
echo "TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG - TRAVIS_JDK_VERSION=$TRAVIS_JDK_VERSION - TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST" | ||
|
||
if [ "$TRAVIS_REPO_SLUG" == "citiususc/hipster" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk7" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then | ||
|
||
# Decide the documentation version folder name depending on the branch and the version in the pom.xml | ||
# wget https://raw.githubusercontent.com/citiususc/hipster/$TRAVIS_BRANCH/pom.xml > /dev/null 2>&1 | ||
# Take the version from the main pom.xml | ||
# grep -m 1 -E '<version>[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9_]+(-[0-9]+)?)?</version>' pom.xml | ||
VERSION=`grep -m 1 "<hipster.version>" pom.xml | cut -d ">" -f 2 | cut -d "<" -f 1` | ||
# rm pom.xml | ||
|
||
# Validate if the version is correct (example 1.0.0-SNAPSHOT, or 1.0.0-alpha-1) | ||
VERSION_REGEX='^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9_]+(-[0-9]+)?)?$' | ||
if [[ $VERSION =~ $VERSION_REGEX ]]; then | ||
echo "Current version is $VERSION" | ||
else | ||
echo "Version error. Unrecognized version $VERSION" | ||
exit 1 | ||
fi | ||
|
||
echo "Deploying Hipster [$VERSION] site and documentation to GitHub gh-pages" | ||
echo "Current directory is: `pwd`" | ||
|
||
|
||
echo "Building javadocs..." | ||
mvn javadoc:aggregate | ||
|
||
# Build site only if this is the development branch. | ||
if [ "$TRAVIS_BRANCH" == "master" ]; then | ||
echo "Building site..." | ||
mvn site:site | ||
fi | ||
|
||
# First, copy the generated site to the new folder | ||
mkdir $HOME/site | ||
cp -Rf target/site/* $HOME/site | ||
# Remove the apidocs site and use the aggregated javadoc instead | ||
rm -rf $HOME/site/apidocs | ||
# Copy the apidocs to the site folder | ||
mkdir $HOME/site/documentation | ||
mkdir $HOME/site/documentation/javadoc | ||
mkdir $HOME/site/documentation/javadoc/$VERSION | ||
cp -Rf target/apidocs/* $HOME/site/documentation/javadoc/$VERSION | ||
|
||
# Now prepare for uploading the site to gh-pages | ||
|
||
cd $HOME | ||
git clone --quiet --branch=gh-pages https://github.com/citiususc/hipster.git gh-pages > /dev/null | ||
|
||
# Copy and overwrite the site with the new content | ||
cp -Rf $HOME/site/* gh-pages/ | ||
cd gh-pages | ||
|
||
# Config git user and credentials | ||
git config --global user.email "travis@travis-ci.org" | ||
git config --global user.name "travis-ci" | ||
git config credential.helper "store --file=.git/credentials" | ||
echo "https://${GITHUB_TOKEN}:@github.com" > .git/credentials | ||
|
||
git add -A | ||
git commit -a -m "auto-commit $TRAVIS_BRANCH Hipster site updated (build $TRAVIS_BUILD_NUMBER)" | ||
git push -q origin gh-pages > /dev/null | ||
echo "Published $TRAVIS_BRANCH Hipster site to gh-pages." | ||
|
||
fi |
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
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 |
---|---|---|
@@ -1,9 +1,21 @@ | ||
language: java | ||
jdk: | ||
- oraclejdk7 | ||
- openjdk6 | ||
- oraclejdk7 | ||
- oraclejdk8 | ||
- openjdk7 | ||
branches: | ||
only: | ||
- master | ||
- development | ||
before_install: 'mvn -version' | ||
- master | ||
- development | ||
after_success: | ||
- chmod +x .config/deploy-site.sh | ||
#- .config/deploy-site.sh | ||
- chmod +x .config/deploy-artifacts.sh | ||
#- .config/deploy-artifacts.sh | ||
env: | ||
global: | ||
- secure: ILdOYjPt+8g5rlexXBYAhECtn5Zm26FRf0/nwCxUU303qtzFQyMcxinIC93aun880OnINjA7fzQeBkG4P+LSVOAXbmGTGhtyPBzMOGcnZouJM/RyXHUft6tAXPimXQ7JjDFjyv7EzSeStk/4WEp0mkxheIryZS3X1pbED1TqgUM= | ||
- secure: cwV1rA8+CUHonJg40dRHCcd8KmYl9EzpCUcnS8vm/1qNkXpRmEAvwNKjZct0sZ8ZFKjKEUEzhyG0+cZVRzvEhi108/WZ5pIxp01EdtSFZTlIg73llALb2P8HClHuy4XSBDz0G4nTLES11usUGpCsLckSudNtb7bdUAH356NxFvQ= | ||
- secure: XNFSHaGHiJfj4TvW6Oud1Z1dKnkXYk0njX2xjfljfFlHf4eCSIUxO9giad4xq2sE7vrjk+JpLLj/te7qjug91Ih7KH0i9T56d57q9vfu8juW49NBQxRnfhlvYWyrto5rmnKEa8Mcs/smgER6dllsURz10AqLKM32mkijG4VgdcM= | ||
- secure: VFkAqPydQ9NTxXkp/gNzNUoaYd/xvryKy+ARXJhbvgUkpO2VMyo2D2wU1G6ECVzitqpO+gaUn2mu7fO1M0KjpeKp5Si7HG3fUVb4sXg6Sim563iot2rJUfiXpu6FOqPfUwQHpyUXqUfAPOA6bI9ZNKNBAurGxgLgt4AP2PjObV4= | ||
- secure: Q5UXkBKvrqcC09peZa/U/XilT4q32fm2tWEu/0Pq0JquKS+BmOevEmntW0zMBe8R5K5AzbuDKurAyelCqXDNj3W8Tjg/xreIqR3ccnfo202wkLiIAtko8oUXzyiLgeMjjyge76lHIkaGxWXNGzsDUZmq5qUQW2YEQ5vGiv0vc5A= |
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
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
Oops, something went wrong.