travis: add files and repo configuration for releases, upload pmd.github.io

This commit is contained in:
Andreas Dangel
2017-02-25 16:24:31 +01:00
parent b17f93085f
commit 03b39acd0b
3 changed files with 21 additions and 7 deletions

View File

@ -36,17 +36,19 @@ deploy:
skip_cleanup: true
on:
tags: true
repo: pmd/pmd
condition: "${TRAVIS_SECURE_ENV_VARS} = true"
- provider: releases
api_key: ${GITHUB_OAUTH_TOKEN}
file_glob: true
file: "pmd-dist/target/pmd-*.zip"
# - "pmd-dist/target/pmd-*.zip"
# - "target/pmd-doc-*.zip"
file:
- pmd-dist/target/pmd-*.zip
- target/pmd-doc-*.zip
# TODO : This won't copy the changelog to GitHub
skip_cleanup: true
on:
tags: true
repo: pmd/pmd
condition: "${TRAVIS_SECURE_ENV_VARS} = true"
after_deploy: true

View File

@ -5,7 +5,7 @@ set -ev
SOURCE_HOME=$PWD
cd $HOME
wget -q http://apache.claz.org/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
wget -q http://www-us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
tar zxf apache-maven-3.3.9-bin.tar.gz
chmod +x apache-maven-3.3.9/bin/mvn

View File

@ -11,8 +11,20 @@ curl -H "Accept: application/json" -X PUT -d "default=windows&default=mac&defaul
-d "api_key=${PMD_SF_APIKEY}" https://sourceforge.net/projects/pmd/files/pmd/${RELEASE_VERSION}/pmd-bin-${RELEASE_VERSION}.zip
# TODO: patch the release on github? Upload the changelog? https://developer.github.com/v3/repos/releases/#create-a-release
# TODO: deploy site from here? We could clone the site repo, and push using a secure token instead of a password...
# TODO: publish site on pmd.github.io
# TODO: Submit news on SF?
echo "Adding the site to pmd.github.io..."
# clone pmd.github.io. Note: This uses the ssh key setup earlier
git clone --depth 1 git@github.com:pmd/pmd.github.io.git
rsync -a target/pmd-doc-${RELEASE_VERSION}/ pmd.github.io/pmd-${RELEASE_VERSION}/
(
cd pmd.github.io
git add pmd-${RELEASE_VERSION}
git commit -m "Added pmd-${RELEASE_VERSION}"
git rm -qr latest
cp -a pmd-${RELEASE_VERSION} latest
git add latest
git commit -m "Copying pmd-${RELEASE_VERSION} to latest"
git push origin
)