Skip to content

Commit 380ac6b

Browse files
committed
Update publishing
1 parent ec009a5 commit 380ac6b

File tree

2 files changed

+22
-44
lines changed

2 files changed

+22
-44
lines changed

build.gradle

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ project.ext {
1818

1919
projectMajorVersion = "6"
2020
projectMinorVersion = "1"
21-
projectPatchVersion = "13"
22-
//releaseType = "RELEASE"
21+
projectPatchVersion = "12"
22+
releaseType = "RELEASE"
2323
// releaseType = "M2"
2424
// releaseType = "RC1"
25-
releaseType = "BUILD-SNAPSHOT"
25+
// releaseType = "BUILD-SNAPSHOT"
2626

2727
// overall project version
2828
projectVersion = "${projectMajorVersion}.${projectMinorVersion}.${projectPatchVersion}"
@@ -73,7 +73,6 @@ allprojects {
7373
all {
7474
resolutionStrategy {
7575
force "org.codehaus.groovy:groovy:$groovyVersion"
76-
force "org.codehaus.groovy:groovy-dateutil:$groovyVersion"
7776
force "org.codehaus.groovy:groovy-xml:$groovyVersion"
7877
force "org.codehaus.groovy:groovy-templates:$groovyVersion"
7978
}
@@ -146,7 +145,6 @@ subprojects {
146145

147146
if (isStandardGroovyMavenProject) {
148147
documentation "org.fusesource.jansi:jansi:1.11"
149-
documentation "org.codehaus.groovy:groovy-dateutil:$groovyVersion"
150148
documentation 'info.picocli:picocli:3.8.0'
151149
compile group: 'org.codehaus.groovy', name: 'groovy', version: groovyVersion
152150

travis-publish.sh

Lines changed: 19 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#!/bin/bash
22

3-
echo "Publishing..."
3+
echo "Publishing for branch $TRAVIS_BRANCH JDK: $TRAVIS_JDK_VERSION"
44

55
EXIT_STATUS=0
66

7+
# Only JDK8 execution will publish the release
8+
if [ "${TRAVIS_JDK_VERSION}" == "openjdk11" ] ; then
9+
exit $EXIT_STATUS
10+
fi
11+
712
if [[ $TRAVIS_REPO_SLUG == "grails/grails-data-mapping" && $TRAVIS_PULL_REQUEST == 'false' && $EXIT_STATUS -eq 0 ]]; then
813

914
echo "Publishing archives"
@@ -13,20 +18,10 @@ if [[ $TRAVIS_REPO_SLUG == "grails/grails-data-mapping" && $TRAVIS_PULL_REQUEST
1318

1419
export GRADLE_OPTS="-XX:MaxPermSize=1024m -Xmx1500m -Dfile.encoding=UTF-8"
1520

16-
gpg --keyserver keyserver.ubuntu.com --recv-key $SIGNING_KEY
17-
if [[ $TRAVIS_TAG =~ ^v[[:digit:]] ]]; then
18-
# for releases we upload to Bintray and Sonatype OSS
19-
./gradlew --stop
20-
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/secring.gpg" uploadArchives || EXIT_STATUS=$?
21-
22-
if [[ $EXIT_STATUS -eq 0 ]]; then
23-
./gradlew --stop
24-
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/secring.gpg" publish || EXIT_STATUS=$?
25-
fi
21+
if [[ -n $TRAVIS_TAG ]]; then
22+
./gradlew publish bintrayUpload --no-daemon --stacktrace || EXIT_STATUS=$?
2623
else
27-
# for snapshots only to repo.grails.org
28-
./gradlew --stop
29-
./gradlew -Psigning.keyId="$SIGNING_KEY" -Psigning.password="$SIGNING_PASSPHRASE" -Psigning.secretKeyRingFile="${TRAVIS_BUILD_DIR}/secring.gpg" publish || EXIT_STATUS=$?
24+
./gradlew publish --no-daemon --stacktrace || EXIT_STATUS=$?
3025
fi
3126

3227
if [[ $EXIT_STATUS -eq 0 ]]; then
@@ -44,25 +39,6 @@ if [[ $TRAVIS_REPO_SLUG == "grails/grails-data-mapping" && $TRAVIS_PULL_REQUEST
4439
git push
4540
cd ..
4641

47-
echo "Triggering Hibernate 4 build"
48-
git clone https://${GH_TOKEN}@github.com/grails/gorm-hibernate4.git gorm-hibernate4
49-
cd gorm-hibernate4
50-
echo "$(date)" > .snapshot
51-
git add .snapshot
52-
git commit -m "New Core Snapshot: $(date)"
53-
git push
54-
cd ..
55-
56-
57-
echo "Triggering REST Client build"
58-
git clone https://${GH_TOKEN}@github.com/grails/gorm-rest-client.git gorm-rest-client
59-
cd gorm-rest-client
60-
echo "$(date)" > .snapshot
61-
git add .snapshot
62-
git commit -m "New Core Snapshot: $(date)"
63-
git push
64-
cd ..
65-
6642
echo "Triggering Neo4j build"
6743
git clone https://${GH_TOKEN}@github.com/grails/gorm-neo4j.git gorm-neo4j
6844
cd gorm-neo4j
@@ -85,21 +61,25 @@ if [[ $TRAVIS_REPO_SLUG == "grails/grails-data-mapping" && $TRAVIS_PULL_REQUEST
8561
# If there is a tag present then this becomes the latest
8662
if [[ $TRAVIS_TAG =~ ^v[[:digit:]] ]]; then
8763
echo "Triggering documentation build"
88-
git clone https://${GH_TOKEN}@github.com/grails/gorm-docs.git gorm-docs
64+
git clone -b 6.1.x https://${GH_TOKEN}@github.com/grails/gorm-docs.git gorm-docs
8965
cd gorm-docs
9066

91-
if [[ $TRAVIS_TAG =~ [M\d|RC\d] ]]; then
92-
echo "gormVersion=${TRAVIS_TAG:1}" > gradle.properties
93-
else
67+
if [[ $TRAVIS_TAG =~ [M\d|RC\d] ]]; then
68+
echo "gormVersion=${TRAVIS_TAG:1}" > gradle.properties
69+
else
9470
echo "gormVersion=${TRAVIS_TAG:1}.RELEASE" > gradle.properties
95-
fi
71+
fi
9672

9773
git add gradle.properties
9874
git commit -m "Release $TRAVIS_TAG docs"
9975
git tag $TRAVIS_TAG
10076
git push --tags
10177
git push
10278
cd ..
79+
80+
if [[ $EXIT_STATUS -eq 0 ]]; then
81+
./gradlew synchronizeWithMavenCentral --no-daemon
82+
fi
10383
fi
10484

10585
else
@@ -111,4 +91,4 @@ fi
11191
if [[ $EXIT_STATUS -eq 0 ]]; then
11292
echo "Publishing Successful."
11393
fi
114-
exit $EXIT_STATUS
94+
exit $EXIT_STATUS

0 commit comments

Comments
 (0)