Skip to content

Commit a6f59e5

Browse files
committed
Integrate infra projects into regular maven release steps
Signed-off-by: marko-bekhta <[email protected]>
1 parent 1be544b commit a6f59e5

File tree

4 files changed

+30
-13
lines changed

4 files changed

+30
-13
lines changed

prepare-release.sh

+11-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,17 @@ if [ "$PROJECT" == "orm" ]; then
5555
-PhibernatePublishUsername=$OSSRH_USER -PhibernatePublishPassword=$OSSRH_PASSWORD \
5656
-DsigningPassword=$RELEASE_GPG_PASSPHRASE -DsigningKeyFile=$RELEASE_GPG_PRIVATE_KEY_PATH
5757
elif [ "$PROJECT" != "reactive" ]; then
58-
# Hibernate Reactive does these checks in the `cirelease` task (called by publish.sh)
59-
"$SCRIPTS_DIR/check-sourceforge-availability.sh"
60-
"$SCRIPTS_DIR/update-readme.sh" $PROJECT $RELEASE_VERSION "$WORKSPACE/README.md"
61-
"$SCRIPTS_DIR/update-changelog.sh" $PROJECT $RELEASE_VERSION "$WORKSPACE/changelog.txt"
58+
# Hibernate Reactive does these checks in the `cirelease` task (called by publish.sh)
59+
if [[ "$PROJECT" != "infra-theme" && "$PROJECT" != "infra-extensions" ]]; then
60+
# Infra projects do not have a distribution bundle archive,
61+
# hence we do not want to check the sourceforge availability as we will not be uploading anything.
62+
# There is also no versions in the readme and no changelog that we can fetch from JIRA,
63+
# as there is no JIRA for these infra projects,
64+
# hence we only run these steps if it's not an infra project:
65+
"$SCRIPTS_DIR/check-sourceforge-availability.sh"
66+
"$SCRIPTS_DIR/update-readme.sh" $PROJECT $RELEASE_VERSION "$WORKSPACE/README.md"
67+
"$SCRIPTS_DIR/update-changelog.sh" $PROJECT $RELEASE_VERSION "$WORKSPACE/changelog.txt"
68+
fi
6269
"$SCRIPTS_DIR/validate-release.sh" $PROJECT $RELEASE_VERSION
6370
"$SCRIPTS_DIR/update-version.sh" $PROJECT $RELEASE_VERSION $INHERITED_VERSION
6471
"$SCRIPTS_DIR/create-tag.sh" $PROJECT $RELEASE_VERSION

publish.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ elif [ "$PROJECT" == "reactive" ]; then
101101
exec_or_dry_run ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository -PsontaypeOssrhUser=$OSSRH_USER -PsonatypeOssrgPassword=$OSSRH_PASSWORD
102102
else
103103
bash -xe "$SCRIPTS_DIR/deploy.sh" "$PROJECT"
104-
105-
exec_or_dry_run bash -xe "$SCRIPTS_DIR/upload-distribution.sh" "$PROJECT" "$RELEASE_VERSION"
106-
exec_or_dry_run bash -xe "$SCRIPTS_DIR/upload-documentation.sh" "$PROJECT" "$RELEASE_VERSION" "$RELEASE_VERSION_FAMILY"
104+
if [[ "$PROJECT" != "infra-theme" && "$PROJECT" != "infra-extensions" ]]; then
105+
exec_or_dry_run bash -xe "$SCRIPTS_DIR/upload-distribution.sh" "$PROJECT" "$RELEASE_VERSION"
106+
exec_or_dry_run bash -xe "$SCRIPTS_DIR/upload-documentation.sh" "$PROJECT" "$RELEASE_VERSION" "$RELEASE_VERSION_FAMILY"
107+
fi
107108

108109
bash -xe "$SCRIPTS_DIR/update-version.sh" "$PROJECT" "$DEVELOPMENT_VERSION"
109110
bash -xe "$SCRIPTS_DIR/push-upstream.sh" "$PROJECT" "$RELEASE_VERSION" "$BRANCH" "$PUSH_CHANGES"

release.sh

+2
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

validate-release.sh

+13-6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ if [ "$PROJECT" == "search" ]; then
2121
STRIPPED_SUFFIX_FOR_TAG=""
2222
elif [ "$PROJECT" == "validator" ]; then
2323
STRIPPED_SUFFIX_FOR_TAG=""
24+
elif [ "$PROJECT" == "infra-theme" ]; then
25+
STRIPPED_SUFFIX_FOR_TAG=""
26+
elif [ "$PROJECT" == "infra-extensions" ]; then
27+
STRIPPED_SUFFIX_FOR_TAG=""
2428
elif [ "$PROJECT" == "ogm" ]; then
2529
STRIPPED_SUFFIX_FOR_TAG=""
2630
elif [ "$PROJECT" == "orm" ]; then
@@ -66,12 +70,15 @@ if [ "$PROJECT" != "orm" ]; then
6670
fi
6771
fi
6872

69-
if grep -q "$RELEASE_VERSION" $CHANGELOG ;
70-
then
71-
echo "SUCCESS: $CHANGELOG looks updated"
72-
else
73-
echo "ERROR: $CHANGELOG has not been updated"
74-
exit 1
73+
# Only check the changelog updates if the changelog file actually exists:
74+
if [ -f $CHANGELOG ]; then
75+
if grep -q "$RELEASE_VERSION" $CHANGELOG ;
76+
then
77+
echo "SUCCESS: $CHANGELOG looks updated"
78+
else
79+
echo "ERROR: $CHANGELOG has not been updated"
80+
exit 1
81+
fi
7582
fi
7683
fi
7784

0 commit comments

Comments
 (0)