Skip to content

Commit

Permalink
Update Create Release Script
Browse files Browse the repository at this point in the history
This change updates the create-release.sh script to create the documentation
for each release as well.
  • Loading branch information
nebhale committed Sep 23, 2016
1 parent 599bca5 commit 6654f34
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions ci/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,37 @@ set -e
RELEASE=$1
SNAPSHOT=$2

PROJECTS=" \
cloudfoundry-client \
cloudfoundry-client-reactor \
cloudfoundry-operations \
cloudfoundry-util"

mvn versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false
git add .
git commit --message "v$RELEASE Release"

git tag -s v$RELEASE -m "v$RELEASE"
git reset --hard HEAD^1

./mvnw -q -Dmaven.test.skip=true package
VERSION=$(./mvnw help:evaluate -Dexpression=project.version | grep -v '\[' | grep -v 'Download')
for PROJECT in $PROJECTS ; do
SOURCE=$PROJECT/target/apidocs
TARGET=../cf-java-client-documentation/api/$VERSION/$PROJECT

echo Copying $SOURCE to $TARGET

mkdir -p $TARGET
rm -rf $TARGET/*
cp -r $SOURCE/* $TARGET
done

pushd ../cf-java-client-documentation
git checkout --orphan release
git add .
git commit --message "$VERSION Documentation Update"
popd

git reset --hard HEAD^1
mvn versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false
git add .
git commit --message "v$SNAPSHOT Development"

0 comments on commit 6654f34

Please sign in to comment.