From b6db65225899983f612edf796ed7237399346da4 Mon Sep 17 00:00:00 2001 From: Kengo TODA Date: Wed, 26 Jul 2017 06:15:54 +0900 Subject: [PATCH] close #19: automatically generate and publish Eclipse Update Site --- .travis.yml | 40 ++++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 42 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5c1b3ef --- /dev/null +++ b/.travis.yml @@ -0,0 +1,40 @@ +# This file builds Eclipse Plugin with Eclipse, +# and push Daily Release Eclipse Update Site for Eclipse Plugin. + +language: java +jdk: oraclejdk8 + +install: + - cd /tmp + - wget 'http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/R-4.6.3-201703010400/eclipse-SDK-4.6.3-linux-gtk-x86_64.tar.gz&r=1' -O eclipse.tar.gz + - tar xfz eclipse.tar.gz eclipse + - git clone https://github.com/spotbugs/spotbugs.git + - echo eclipseRoot.dir=/tmp/eclipse > /tmp/spotbugs/eclipsePlugin/local.properties + +script: + - cd /tmp/spotbugs + - ./gradlew :eclipsePlugin:eclipseSite + +before_deploy: + - cd ${TRAVIS_BUILD_DIR} + - git checkout ${TRAVIS_BRANCH} + - rm -rf ${TRAVIS_BUILD_DIR}/eclipse-daily + - cp -R /tmp/spotbugs/eclipsePlugin/build/site/eclipse-daily . + # To push changes via https, store private token to ~/.netrc + # https://docs.travis-ci.com/user/private-dependencies/#API-Token + - echo machine github.com >> ~/.netrc + - echo login ${GITHUB_TOKEN} >> ~/.netrc + - git config user.email "travis@spotbugs.github.io" + - git config user.name "Deployment Bot (from Travis CI)" + - git add eclipse-daily + - git commit -m "Update contents for Eclipse Daily Update Site by build ${TRAVIS_BUILD_NUMBER}" + +deploy: + provider: script + skip_cleanup: true + script: git push + on: + branch: master + repo: spotbugs/spotbugs.github.io + # This condition is necessary, or pushing changes will trigger infinite loop (next build and push) + condition: $TRAVIS_EVENT_TYPE = cron diff --git a/README.md b/README.md index 0529ddd..c406f24 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ SpotBugs GitHub pages ===================== +[![Build Status](https://travis-ci.org/spotbugs/spotbugs.github.io.svg?branch=master)](https://travis-ci.org/spotbugs/spotbugs.github.io) + This repository hosts following pages: * [GitHub homepage](https://spotbugs.github.io/)