Skip to content

Commit 7f60505

Browse files
committed
Add support for HCANN
1 parent 1fe4409 commit 7f60505

File tree

5 files changed

+38
-24
lines changed

5 files changed

+38
-24
lines changed

deploy.sh

+17-9
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,25 @@ if [ "$PROJECT" == "orm" ] || [ "$PROJECT" == "reactive" ]; then
1818
exit 1
1919
fi
2020

21-
if [ "$PROJECT" == "ogm" ]; then
22-
ADDITIONAL_OPTIONS="-DmongodbProvider=external -DskipITs"
23-
elif [ "$PROJECT" == "search" ]; then
24-
# Disable Develocity build scan publication and build caching
25-
ADDITIONAL_OPTIONS="-Dscan=false -Dno-build-cache -Dgradle.cache.remote.enabled=false -Dgradle.cache.local.enabled=false"
21+
if [ -f "./gradlew" ]; then
22+
# Gradle-based build
23+
24+
./gradlew --no-scan --no-daemon --no-build-cache publish
2625
else
27-
ADDITIONAL_OPTIONS=""
28-
fi
26+
# Maven-based build
2927

30-
source "$SCRIPTS_DIR/mvn-setup.sh"
28+
if [ "$PROJECT" == "ogm" ]; then
29+
ADDITIONAL_OPTIONS="-DmongodbProvider=external -DskipITs"
30+
elif [ "$PROJECT" == "search" ]; then
31+
# Disable Develocity build scan publication and build caching
32+
ADDITIONAL_OPTIONS="-Dscan=false -Dno-build-cache -Dgradle.cache.remote.enabled=false -Dgradle.cache.local.enabled=false"
33+
else
34+
ADDITIONAL_OPTIONS=""
35+
fi
3136

32-
./mvnw -Pdocbook,documentation-pdf,dist,perf,relocation,release clean deploy -DskipTests=true -Dcheckstyle.skip=true -DperformRelease=true -Dmaven.compiler.useIncrementalCompilation=false $ADDITIONAL_OPTIONS
37+
source "$SCRIPTS_DIR/mvn-setup.sh"
38+
39+
./mvnw -Pdocbook,documentation-pdf,dist,perf,relocation,release clean deploy -DskipTests=true -Dcheckstyle.skip=true -DperformRelease=true -Dmaven.compiler.useIncrementalCompilation=false $ADDITIONAL_OPTIONS
40+
fi
3341

3442
popd

prepare-release.sh

+3-5
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ if [ "$PROJECT" == "orm" ] || [ "$PROJECT" == "reactive" ]; then
5555
-PhibernatePublishUsername=$OSSRH_USER -PhibernatePublishPassword=$OSSRH_PASSWORD \
5656
-DsigningPassword=$RELEASE_GPG_PASSPHRASE -DsigningKeyFile=$RELEASE_GPG_PRIVATE_KEY_PATH
5757
else
58-
if [[ "$PROJECT" != "infra-theme" && "$PROJECT" != "infra-extensions" ]]; then
59-
# Infra projects do not have a distribution bundle archive,
58+
if [[ "$PROJECT" != "infra-theme" && "$PROJECT" != "infra-extensions" && "$PROJECT" != "hcann" ]]; then
59+
# These projects do not have a distribution bundle archive,
6060
# hence we do not want to check the sourceforge availability as we will not be uploading anything.
61-
# There is also no versions in the readme and no changelog that we can fetch from JIRA,
62-
# as there is no JIRA for these infra projects,
63-
# hence we only run these steps if it's not an infra project:
61+
# There is also no version in the readme and no changelog file.
6462
"$SCRIPTS_DIR/check-sourceforge-availability.sh"
6563
"$SCRIPTS_DIR/update-readme.sh" $PROJECT $RELEASE_VERSION "$WORKSPACE/README.md"
6664
"$SCRIPTS_DIR/update-changelog.sh" $PROJECT $RELEASE_VERSION "$WORKSPACE/changelog.txt"

publish.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ if [ "$PROJECT" == "orm" ] || [ "$PROJECT" == "reactive" ]; then
8585
-DsigningPassword=$RELEASE_GPG_PASSPHRASE -DsigningKeyFile=$RELEASE_GPG_PRIVATE_KEY_PATH --stacktrace
8686
else
8787
bash -xe "$SCRIPTS_DIR/deploy.sh" "$PROJECT"
88-
if [[ "$PROJECT" != "infra-theme" && "$PROJECT" != "infra-extensions" ]]; then
88+
if [[ "$PROJECT" != "infra-theme" && "$PROJECT" != "infra-extensions" && "$PROJECT" != "hcann" ]]; then
8989
exec_or_dry_run bash -xe "$SCRIPTS_DIR/upload-distribution.sh" "$PROJECT" "$RELEASE_VERSION"
9090
exec_or_dry_run bash -xe "$SCRIPTS_DIR/upload-documentation.sh" "$PROJECT" "$RELEASE_VERSION" "$RELEASE_VERSION_FAMILY"
9191
fi

update-version.sh

+15-9
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,22 @@ fi
2121

2222
pushd $WORKSPACE
2323

24-
source "$SCRIPTS_DIR/mvn-setup.sh"
25-
26-
if [ -f bom/pom.xml ] && [ "$PROJECT" == "ogm" ]; then
27-
./mvnw -Prelocation clean versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -f bom/pom.xml
28-
elif [ -z "$VERSION_INHERITED" ]; then
29-
./mvnw -Prelocation clean versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false
24+
if [ -f "./gradlew" ]; then
25+
# Gradle-based build
26+
echo "hibernateVersion=$NEW_VERSION" > ./gradle/version.properties
3027
else
31-
# Version inherited from parent
32-
./mvnw -Prelocation versions:update-parent -DparentVersion="[1.0, $NEW_VERSION]" -DgenerateBackupPoms=false -DallowSnapshots=true
33-
./mvnw -Prelocation -N versions:update-child-modules -DgenerateBackupPoms=false
28+
# Maven-based build
29+
source "$SCRIPTS_DIR/mvn-setup.sh"
30+
31+
if [ -f bom/pom.xml ] && [ "$PROJECT" == "ogm" ]; then
32+
./mvnw -Prelocation clean versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false -f bom/pom.xml
33+
elif [ -z "$VERSION_INHERITED" ]; then
34+
./mvnw -Prelocation clean versions:set -DnewVersion=$NEW_VERSION -DgenerateBackupPoms=false
35+
else
36+
# Version inherited from parent
37+
./mvnw -Prelocation versions:update-parent -DparentVersion="[1.0, $NEW_VERSION]" -DgenerateBackupPoms=false -DallowSnapshots=true
38+
./mvnw -Prelocation -N versions:update-child-modules -DgenerateBackupPoms=false
39+
fi
3440
fi
3541

3642
popd

validate-release.sh

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ elif [ "$PROJECT" == "orm" ]; then
3131
STRIPPED_SUFFIX_FOR_TAG=".Final"
3232
elif [ "$PROJECT" == "reactive" ]; then
3333
STRIPPED_SUFFIX_FOR_TAG=".Final"
34+
elif [ "$PROJECT" == "hcann" ]; then
35+
STRIPPED_SUFFIX_FOR_TAG=""
3436
else
3537
echo "ERROR: Unknown project name $PROJECT"
3638
exit 1

0 commit comments

Comments
 (0)