Skip to content

Commit 1d4f428

Browse files
committed
Add branches for infra projects
as those use a different mechanism and plugins to perform the release Signed-off-by: marko-bekhta <[email protected]>
1 parent 41bf900 commit 1d4f428

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

prepare-release.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,14 @@ if [ "$PROJECT" == "orm" ]; then
5454
-Pgradle.publish.key=$PLUGIN_PORTAL_USERNAME -Pgradle.publish.secret=$PLUGIN_PORTAL_PASSWORD \
5555
-PhibernatePublishUsername=$OSSRH_USER -PhibernatePublishPassword=$OSSRH_PASSWORD \
5656
-DsigningPassword=$RELEASE_GPG_PASSPHRASE -DsigningKeyFile=$RELEASE_GPG_PRIVATE_KEY_PATH
57+
elif [[ "$PROJECT" == "infra-theme" || "$PROJECT" == "infra-extensions" ]]; then
58+
./mvnw release:prepare \
59+
-Dtag=$RELEASE_VERSION \
60+
-DreleaseVersion=$RELEASE_VERSION \
61+
-DdevelopmentVersion=$DEVELOPMENT_VERSION \
62+
-DperformRelease=true
5763
elif [ "$PROJECT" != "reactive" ]; then
58-
# Hibernate Reactive does these checks in the `cirelease` task (called by publish.sh)
64+
# Hibernate Reactive does these checks in the `cirelease` task (called by publish.sh)
5965
"$SCRIPTS_DIR/check-sourceforge-availability.sh"
6066
"$SCRIPTS_DIR/update-readme.sh" $PROJECT $RELEASE_VERSION "$WORKSPACE/README.md"
6167
"$SCRIPTS_DIR/update-changelog.sh" $PROJECT $RELEASE_VERSION "$WORKSPACE/changelog.txt"

publish.sh

+2
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ elif [ "$PROJECT" == "reactive" ]; then
9999
fi
100100
# Publish the artifact to OSSRH
101101
exec_or_dry_run ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -PsontaypeOssrhUser=$OSSRH_USER -PsonatypeOssrgPassword=$OSSRH_PASSWORD
102+
elif [[ "$PROJECT" == "infra-theme" || "$PROJECT" == "infra-extensions" ]]; then
103+
exec_or_dry_run ./mvnw release:perform -DperformRelease=true
102104
else
103105
bash -xe "$SCRIPTS_DIR/deploy.sh" "$PROJECT"
104106

release.sh

+9-1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ elif [ "$PROJECT" == "orm" ]; then
110110
JIRA_PROJECT="HHH"
111111
elif [ "$PROJECT" == "reactive" ]; then
112112
JIRA_PROJECT="HREACT"
113+
elif [[ "$PROJECT" == "infra-theme" || "$PROJECT" == "infra-extensions" ]]; then
114+
echo 'No JIRA project available'
113115
else
114116
echo "ERROR: Unknown project name $PROJECT"
115117
usage
@@ -186,7 +188,13 @@ if [ "$PUSH_CHANGES" != "true" ]; then
186188
ADDITIONAL_OPTIONS="-d"
187189
fi
188190

189-
bash -xe "$SCRIPTS_DIR/prepare-release.sh" "$PROJECT" "$RELEASE_VERSION"
191+
elif [ "$PROJECT" == "infra-theme" || "$PROJECT" == "infra-extensions" ]; then
192+
# infra projects are using different release plugins than main maven-based projects,
193+
# and they require both release and development versions:
194+
bash -xe "$SCRIPTS_DIR/prepare-release.sh" "$PROJECT" "$RELEASE_VERSION" "$DEVELOPMENT_VERSION"
195+
else
196+
bash -xe "$SCRIPTS_DIR/prepare-release.sh" "$PROJECT" "$RELEASE_VERSION"
197+
fi
190198

191199
#bash -xe "$SCRIPTS_DIR/jira-release.sh" $ADDITIONAL_OPTIONS "$JIRA_PROJECT" "$RELEASE_VERSION_BASIS" "$NEXT_VERSION_BASIS"
192200

0 commit comments

Comments
 (0)