forked from phoedos/pmd
Merge branch 'travis-automated-release' into pmd/5.4.x
This commit is contained in:
commit
3d4e17b2cf
@ -4,10 +4,10 @@ set -ev
|
||||
VERSION=$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.5.0:exec)
|
||||
echo "Building PMD ${VERSION} on branch ${TRAVIS_BRANCH}"
|
||||
|
||||
if [[ "$VERSION" == *-SNAPSHOT ]]; then
|
||||
mvn deploy -Possrh -B -V
|
||||
else
|
||||
if [[ "$VERSION" != *-SNAPSHOT && "$TRAVIS_TAG" != "" ]]; then
|
||||
mvn deploy -Possrh,pmd-release -B -V
|
||||
else
|
||||
mvn deploy -Possrh -B -V
|
||||
fi
|
||||
|
||||
bash .travis/build-site.sh
|
||||
@ -20,9 +20,10 @@ bash .travis/build-site.sh
|
||||
)
|
||||
|
||||
# Uploading pmd distribution to sourceforge
|
||||
rsync -avh pmd-dist/target/pmd-*-${VERSION}.zip target/pmd-doc-${VERSION}.zip ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/
|
||||
rsync -avh src/site/markdown/overview/changelog.md ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/ReadMe.md
|
||||
|
||||
if [ "$TRAVIS_TAG" = "" ]; then
|
||||
rsync -avh pmd-dist/target/pmd-*-${VERSION}.zip target/pmd-doc-${VERSION}.zip ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/
|
||||
rsync -avh src/site/markdown/overview/changelog.md ${PMD_SF_USER}@web.sourceforge.net:/home/frs/project/pmd/pmd/${VERSION}/ReadMe.md
|
||||
fi
|
||||
|
||||
if [[ "$VERSION" == *-SNAPSHOT && "$TRAVIS_BRANCH" == "master" ]]; then
|
||||
# Uploading snapshot site...
|
||||
|
@ -26,8 +26,12 @@ cat > release-edit-request.json <<EOF
|
||||
}
|
||||
EOF
|
||||
echo "Updating release at https://api.github.com/repos/pmd/pmd/releases/${RELEASE_ID}..."
|
||||
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}|grep "^HTTP"
|
||||
|
||||
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})
|
||||
if [[ "$RESPONSE" != *"HTTP/1.1 200"* ]]; then
|
||||
echo "$RESPONSE"
|
||||
else
|
||||
echo "Update OK"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@ -37,6 +41,8 @@ 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 config user.email "adangel@users.sourceforge.net"
|
||||
git config user.name "Andreas Dangel (PMD Releases)"
|
||||
git add pmd-${RELEASE_VERSION}
|
||||
git commit -m "Added pmd-${RELEASE_VERSION}"
|
||||
git rm -qr latest
|
||||
|
271
do-release.sh
271
do-release.sh
File diff suppressed because it is too large
Load Diff
4
pom.xml
4
pom.xml
@ -611,7 +611,9 @@ Additionally it includes CPD, the copy-paste-detector. CPD finds duplicated code
|
||||
<configuration>
|
||||
<serverId>ossrh</serverId>
|
||||
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
||||
<autoReleaseAfterClose>false</autoReleaseAfterClose> <!-- settings this to true will automatically promote releases to central -->
|
||||
<!-- if autoReleaseAfterClose is true, then the artifacts will be
|
||||
automatically promoted to maven central -->
|
||||
<autoReleaseAfterClose>true</autoReleaseAfterClose>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
Loading…
x
Reference in New Issue
Block a user