@@ -100,6 +100,12 @@ Options include:
100100 --skip-gpg - Do not perform GPG signing of artifacts.
101101"
102102
103+ # -- Extract project details --
104+
105+ projectDetails=$( mvn -N -Dexec.executable=' echo' -Dexec.args=' ${project.version}::${project.parent.groupId}:${project.parent.artifactId}:${project.parent.version}' exec:exec -q)
106+ parentGAV=${projectDetails#*:: }
107+ currentVersion=${projectDetails%::* }
108+
103109# -- Sanity checks --
104110
105111# Check that we have push rights to the repository.
111117fi
112118
113119# Discern the version to release.
114- currentVersion=$( mvn -N -Dexec.executable=' echo' -Dexec.args=' ${project.version}' exec:exec -q)
115120pomVersion=${currentVersion% -SNAPSHOT}
116121test " $VERSION " || test ! -t 0 || {
117122 printf ' Version? [%s]: ' " $pomVersion "
@@ -136,6 +141,17 @@ test "$SKIP_VERSION_CHECK" || {
136141 sh -$- " $VALID_SEMVER_BUMP " " $pomVersion " " $VERSION " || die
137142}
138143
144+ # Check that the project extends the latest version of pom-scijava.
145+ MAVEN_HELPER=" $( cd " $( dirname " $0 " ) " && pwd) /maven-helper.sh"
146+ test -f " $MAVEN_HELPER " ||
147+ die " Missing helper script at '$MAVEN_HELPER '"
148+ test " $SKIP_VERSION_CHECKS " || {
149+ latestParentVersion=$( sh -$- " $MAVEN_HELPER " latest-version " $parentGAV " )
150+ currentParentVersion=${parentGAV##*: }
151+ test " $currentParentVersion " = " $latestParentVersion " ||
152+ die " Newer version of parent '${parentGAV%:* } ' is available: $latestParentVersion "
153+ }
154+
139155# Check that the working copy is clean.
140156no_changes_pending || die ' There are uncommitted changes!'
141157
0 commit comments