Skip to content

Commit fdba384

Browse files
committed
hibernate/hibernate-reactive#1956 Update scripts for Hibernate Reactive
1 parent 7708a1d commit fdba384

7 files changed

+29
-9
lines changed

deploy.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ if [ -z "$PROJECT" ]; then
1212
exit 1
1313
fi
1414

15-
if [ "$PROJECT" == "orm" ]; then
16-
echo "ERROR: deploy.sh should not be used with ORM, use publish.sh instead"
15+
PROJECT_NAME=$([ "$PROJECT" == "orm" ] && echo "ORM" || echo "Reactive")
16+
if [ "$PROJECT" == "orm" ] || [ "$PROJECT" == "reactive" ]; then
17+
echo "ERROR: deploy.sh should not be used with $PROJECT_NAME, use publish.sh instead"
1718
exit 1
1819
fi
1920

determine-current-version.sh

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ fi
1212

1313
if [ "$PROJECT" == "orm" ]; then
1414
grep hibernateVersion $WORKSPACE/gradle/version.properties|cut -d'=' -f2
15+
elif [ "$PROJECT" == "reactive" ]; then
16+
# For example, if `version.properties` contains `projectVersion=2.4.5-SNAPSHOT`, it returns `2.4.5-SNAPSHOT`
17+
grep projectVersion $WORKSPACE/gradle/version.properties|cut -d'=' -f2
1518
else
1619
mvn -f $WORKSPACE/pom.xml org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version -q -DforceStdout
1720
fi

github-release.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function usage() {
66
echo
77
echo " $0 [options] <project> <release_version>"
88
echo
9-
echo " <project> One of [search,validator,ogm,orm]"
9+
echo " <project> One of [search,validator,ogm,orm,reactive]"
1010
echo " <release_version> The version to release (e.g. 6.0.1)"
1111
echo
1212
echo " Options"
@@ -103,7 +103,7 @@ if [ "$PUSH_CHANGES" == 'true' ] && [ -z "$GITHUB_API_TOKEN" ]; then
103103
exit 1
104104
fi
105105

106-
docsUrl="https://docs.jboss.org/hibernate/orm/${RELEASE_VERSION_FAMILY}"
106+
docsUrl="https://docs.jboss.org/hibernate/${PROJECT}/${RELEASE_VERSION_FAMILY}"
107107
javadocsUrl="${docsUrl}/javadocs"
108108
migrationGuideUrl="${docsUrl}/migration-guide/migration-guide.html"
109109
introGuideUrl="${docsUrl}/introduction/html_single/Hibernate_Introduction.html"
@@ -125,7 +125,7 @@ You can find the full list of ${RELEASE_VERSION} changes [here](https://hibernat
125125
126126
For additional details, see:
127127
128-
- the [release page](https://hibernate.org/orm/releases/${RELEASE_VERSION_FAMILY}/)
128+
- the [release page](https://hibernate.org/${PROJECT}/releases/${RELEASE_VERSION_FAMILY}/)
129129
- the [Migration Guide](${migrationGuideUrl})
130130
- the [Introduction Guide](${introGuideUrl})
131131
- the [User Guide](${userGuideUrl})

prepare-release.sh

+2
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ 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" == "reactive" ]; then
58+
# Hibernate Reactive does these checks in the `cirelease` task (called by publish.sh)
5759
else
5860
"$SCRIPTS_DIR/check-sourceforge-availability.sh"
5961
"$SCRIPTS_DIR/update-readme.sh" $PROJECT $RELEASE_VERSION "$WORKSPACE/README.md"

publish.sh

+16-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
function usage() {
44
echo "Usage:"
55
echo
6-
echo " $0 [options] <project> <release_version> <development_version>"
6+
echo " $0 [options] <project> <release_version> <development_version> <branch>"
77
echo
8-
echo " <project> One of [search,validator,ogm,orm]"
8+
echo " <project> One of [search,validator,ogm,orm,reactive]"
99
echo " <release_version> The version to release (e.g. 6.0.1.Final)"
1010
echo " <development_version> The new version after the release (e.g. 6.0.2-SNAPSHOT)"
11+
echo " <branch> The branch we want to release"
1112
echo
1213
echo " Options"
1314
echo
@@ -82,6 +83,19 @@ if [ "$PROJECT" == "orm" ]; then
8283
-Pgradle.publish.key=$PLUGIN_PORTAL_USERNAME -Pgradle.publish.secret=$PLUGIN_PORTAL_PASSWORD \
8384
-PhibernatePublishUsername=$OSSRH_USER -PhibernatePublishPassword=$OSSRH_PASSWORD \
8485
-DsigningPassword=$RELEASE_GPG_PASSPHRASE -DsigningKeyFile=$RELEASE_GPG_PRIVATE_KEY_PATH --stacktrace
86+
87+
elif [ "$PROJECT" == "reactive" ]; then
88+
git config user.email [email protected]
89+
git config user.name Hibernate-CI
90+
91+
# Update the project development version and create the tag for the version to be released
92+
exec_or_dry_run ./gradlew ciRelease -PreleaseVersion=$RELEASE_VERSION -PdevelopmentVersion=$DEVELOPMENT_VERSION -PgitRemote=origin -PgitBranch=$BRANCH
93+
# Create the artifacts and the documentation
94+
exec_or_dry_run ./gradlew assemble
95+
# Publish the documentation on hibernate.org (production branch)
96+
exec_or_dry_run ./gradlew publishDocumentation -PdocPublishBranch=production
97+
# Publish the artifact to OSSRH
98+
exec_or_dry_run ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -PsontaypeOssrhUser=$OSSRH_USER -PsonatypeOssrgPassword=$OSSRH_PASSWORD
8599
else
86100
bash -xe "$SCRIPTS_DIR/deploy.sh" "$PROJECT"
87101

release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ function usage() {
55
echo
66
echo " $0 [options] <project> <release_version> <development_version>"
77
echo
8-
echo " <project> One of [search,validator,ogm,orm]"
8+
echo " <project> One of [search,validator,ogm,orm,reactive]"
99
echo " <release_version> The version to release (e.g. 6.0.1.Final)"
1010
echo " <development_version> The new version after the release (e.g. 6.0.2-SNAPSHOT)"
1111
echo

website-release.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function usage() {
66
echo
77
echo " $0 [options] <project> <release_version>"
88
echo
9-
echo " <project> One of [search,validator,ogm,orm]"
9+
echo " <project> One of [search,validator,ogm,orm,reactive]"
1010
echo " <release_version> The version to release (e.g. 6.0.1)"
1111
echo
1212
echo " Options"

0 commit comments

Comments
 (0)