Merge branch 'travis-automated-releases' into pmd/5.5.x
This commit is contained in:
@ -28,7 +28,6 @@ deploy:
|
||||
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
|
||||
@ -54,7 +53,7 @@ env:
|
||||
- secure: "mmHRnK/8CHfgtwaTN3MgjFD1R8EVQhIb/a0Aag3gPaHWW52Ex6xWG7GsF4kRcdzHdIdrQxHZTiDa2oVMWbnQ16CAu4dZJadwTxhBW4JmE1tsi2C6i+uwMBPvnKBXHwt+QOAqNB0L/ByYwWLkucSLoyRs6qU0i7sJ3ZC/EPCuLI8VfBlFUVegSbp2WmclmFnxOi5MKr15Zwd8BGgyWUsvd1OHxhvO3Xr/ZPO4R+1kIgyojloTMu6oGM/shYgsrUXgmI/WvZRTq+25SRCjUmATJtuDXXgVeJtYabi/+Zju5Z7K06oaKvFYM+BgZWPmGQkVCxKVjSlug0rx6+qgRKIf/B/cPxmQDS0ZZVDmDcbxeibBL9JhRqIDwDb0XS9t1qBXvIJ5E4ZmdX/XuvLCnC4xJptu/vHyKl1wbRM3dcXEBk8J0knJc4JvY2yupF3LS32sfEHftLwzr63U3/0dOQvsCSJRBy5zgI8ieABUZAeZmmaQ6RCGOTEYrGO2G4CCF2uVq4YdrCOsfmrb0DzH8llNMkXKzXlITRvmkuBlTRRKxGnPzS3vf0iicdAkmTiU5u7lArFFc7IKcW4ypO+RKDTUpq74K+UZBI9eBjV7Po368EO8epJ5aIx32a2kyS/hYWkS/dZh7I0fNZa2qBUceZO/KZGRjH4dQFW9t0J9Q7LLXJY="
|
||||
- secure: "geOU/7VR83KYTOCR5XkgFqnHJEnXeB6hNDE7UFcN4ZsL9uVLhxlDVWV3ujJ87nyBzggG1KfSnUx11UwOQrbBl0K6sEXo/B2q5ytOsWoSLi7+0qm/uhhw/DTBOq57p8TIDKFM7rDhO7uajSn7Y86LeZkh9w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kG4nKVTBX0l9VoKiYFhIpIhpbigi3jyLDMDRiWpwTWZC6P8/RXfZg/lc5ADOuM2DM8oXPpZuqOa/g31LWQOSCuEnQ1G16vbLgipSPpgAc7jYWD5cywhG9dLkiKaZDh5x0meLM2RoAgz6eAnQfTTqJ68OM9o9yXjubEedsNpNRAr9/DXMd+fbh10W2vbvL5HCNB3lic3anehhR9le7PLuEKxg654wXt3KM2PZGVWbotIyBK0CvGzqGkppvwT23QdDDqSdkWuGQIhGQ0xBOdYkwebycxP5wwPUmObG+mymQ1Be2BXvmghttsiJdKlt4CVSYOJUMus6kU32G95hdTgKblsX4J1Of2i1nYsjyMKh3k945tqXwQrIsxOOQug0oIkz24zlLaOaQcorWtJ6Y1HPaZKpVIFUEF0y8Uq/O4oB2bOYC6WDUQfpj7nRG6xbi+BeBS84m1ttCEk4g="
|
||||
|
||||
|
||||
# Secure Keys, that need to be set for snapshot builds
|
||||
|
@ -14,7 +14,7 @@ curl -H "Accept: application/json" -X PUT -d "default=windows&default=mac&defaul
|
||||
# Assumes, the release has already been created by travis github releases provider
|
||||
RELEASE_ID=$(curl -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" https://api.github.com/repos/pmd/pmd/releases/tags/pmd_releases/${RELEASE_VERSION}|jq ".id")
|
||||
RELEASE_NAME="PMD ${RELEASE_VERSION} ($(date -u +%d-%B-%Y))"
|
||||
RELEASE_BODY=$(cat src/site/markdown/overview/changelog.md)
|
||||
RELEASE_BODY=$(tail -n +3 src/site/markdown/overview/changelog.md) # skips the first 2 lines - the heading 'PMD Release Notes'
|
||||
RELEASE_BODY="${RELEASE_BODY//$'\\'/\\\\}"
|
||||
RELEASE_BODY="${RELEASE_BODY//$'\r'/}"
|
||||
RELEASE_BODY="${RELEASE_BODY//$'\n'/\\r\\n}"
|
||||
@ -26,7 +26,9 @@ cat > release-edit-request.json <<EOF
|
||||
}
|
||||
EOF
|
||||
echo "Updating release at https://api.github.com/repos/pmd/pmd/releases/${RELEASE_ID}..."
|
||||
RESPONSE=$(curl -i -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" -H "Content-Type: application/json" --data-binary "@release-edit-request.json" -X PATCH https://api.github.com/repos/pmd/pmd/releases/${RELEASE_ID})
|
||||
|
||||
|
||||
RESPONSE=$(curl -i -s -H "Authorization: token ${GITHUB_OAUTH_TOKEN}" -H "Content-Type: application/json" --data "@release-edit-request.json" -X PATCH https://api.github.com/repos/pmd/pmd/releases/${RELEASE_ID})
|
||||
if [[ "$RESPONSE" != *"HTTP/1.1 200"* ]]; then
|
||||
echo "Request:"
|
||||
cat release-edit-request.json
|
||||
@ -41,19 +43,24 @@ fi
|
||||
|
||||
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}/
|
||||
# In order to speed things up, we use a sparse checkout - no need to checkout all directories here
|
||||
mkdir pmd.github.io
|
||||
(
|
||||
cd pmd.github.io
|
||||
git config user.email "adangel@users.sourceforge.net"
|
||||
git config user.name "Andreas Dangel (PMD Releases)"
|
||||
git checkout master
|
||||
git add pmd-${RELEASE_VERSION}
|
||||
git commit -q -m "Added pmd-${RELEASE_VERSION}"
|
||||
git rm -qr latest
|
||||
cp -a pmd-${RELEASE_VERSION} latest
|
||||
git add latest
|
||||
git commit -q -m "Copying pmd-${RELEASE_VERSION} to latest"
|
||||
git push origin master
|
||||
cd pmd.github.io
|
||||
git init
|
||||
git config user.email "adangel+pmd-bot@users.sourceforge.net"
|
||||
git config user.name "Andreas Dangel (PMD Releases)"
|
||||
git config core.sparsecheckout true
|
||||
git remote add origin git@github.com:pmd/pmd.github.io.git
|
||||
echo "latest/" > .git/info/sparse-checkout
|
||||
git pull --depth=1 origin master
|
||||
rsync -a ../target/pmd-doc-${RELEASE_VERSION}/ pmd-${RELEASE_VERSION}/
|
||||
git add pmd-${RELEASE_VERSION}
|
||||
git commit -q -m "Added pmd-${RELEASE_VERSION}"
|
||||
git rm -qr latest
|
||||
cp -a pmd-${RELEASE_VERSION} latest
|
||||
git add latest
|
||||
git commit -q -m "Copying pmd-${RELEASE_VERSION} to latest"
|
||||
git push origin master
|
||||
)
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user