Skip to content

Commit d6d666d

Browse files
committed
Release Script Polishing
Previously, the release script assumed that it was run from the cf-java-client folder. This does not match with the expectation that it will be run as part of a Concourse pipeline. This change updates the code so that the working directory is in the expected location, as well as updating all calls to Maven to use the one packaged within the projects themselves.
1 parent 5968728 commit d6d666d

File tree

1 file changed

+23
-19
lines changed

1 file changed

+23
-19
lines changed

ci/create-release.sh

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,35 @@ PROJECTS=" \
1111
cloudfoundry-operations \
1212
cloudfoundry-util"
1313

14-
mvn versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false
15-
git add .
16-
git commit --message "v$RELEASE Release"
17-
git tag -s v$RELEASE -m "v$RELEASE"
14+
pushd cf-java-client
15+
./mvnw versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false
16+
git add .
17+
git commit --message "v$RELEASE Release"
18+
git tag -s v$RELEASE -m "v$RELEASE"
1819

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

25-
echo Copying $SOURCE to $TARGET
26+
echo Copying $SOURCE to $TARGET
2627

27-
mkdir -p $TARGET
28-
rm -rf $TARGET/*
29-
cp -r $SOURCE/* $TARGET
30-
done
28+
mkdir -p $TARGET
29+
rm -rf $TARGET/*
30+
cp -r $SOURCE/* $TARGET
31+
done
32+
popd
3133

32-
pushd ../cf-java-client-documentation
34+
pushd cf-java-client-documentation
3335
git checkout --orphan release
3436
git add .
3537
git commit --message "$VERSION Documentation Update"
3638
popd
3739

38-
git reset --hard HEAD^1
39-
mvn versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false
40-
git add .
41-
git commit --message "v$SNAPSHOT Development"
40+
pushd cf-java-client
41+
git reset --hard HEAD^1
42+
./mvnw versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false
43+
git add .
44+
git commit --message "v$SNAPSHOT Development"
45+
popd

0 commit comments

Comments
 (0)