Skip to content

Commit 7892dda

Browse files
committed
Adapt release-version.sh to nar-maven-plugin living on OSS Sonatype
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 81e6192 commit 7892dda

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

release-version.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ TAG=
2323
DEV_VERSION=
2424
EXTRA_ARGS=
2525
ALT_REPOSITORY=
26+
PROFILE=
2627
DRY_RUN=
2728
while test $# -gt 0
2829
do
@@ -88,11 +89,14 @@ net.imglib2:pom-imglib2:2.0.0-*SNAPSHOT)
8889
net.imagej:ij-launcher:*)
8990
SKIP_DEPLOY=t
9091
;;
91-
net.sf.antcontrib:cpptasks-parallel:*|*:maven-nar-plugin:*|*:nar-maven-plugin:*)
92+
net.sf.antcontrib:cpptasks-parallel:*|*:maven-nar-plugin:*)
9293
BATCH_MODE=
9394
SKIP_PUSH=t
9495
ALT_REPOSITORY=$IMAGEJ_THIRDPARTY_REPOSITORY
9596
;;
97+
*:nar-maven-plugin:*)
98+
PROFILE=-Psonatype-oss-release
99+
;;
96100
*:pom-*:*)
97101
ARTIFACT_ID=${BASE_GAV#*:pom-}
98102
ARTIFACT_ID=${ARTIFACT_ID%:*}
@@ -116,7 +120,7 @@ die "'master' is not up-to-date"
116120

117121
# Prepare new release without pushing (requires the release plugin >= 2.1)
118122
$DRY_RUN mvn $BATCH_MODE release:prepare -DpushChanges=false -Dresume=false $TAG \
119-
$DEV_VERSION -DreleaseVersion="$VERSION" \
123+
$PROFILE $DEV_VERSION -DreleaseVersion="$VERSION" \
120124
"-Darguments=${EXTRA_ARGS# }" &&
121125

122126
# Squash the two commits on the current branch into one
@@ -144,7 +148,7 @@ exit
144148
if test -z "$SKIP_DEPLOY"
145149
then
146150
$DRY_RUN git checkout $tag &&
147-
$DRY_RUN mvn -DperformRlease clean verify &&
148-
$DRY_RUN mvn $ALT_REPOSITORY -DperformRelease -DupdateReleaseInfo=true deploy &&
151+
$DRY_RUN mvn $PROFILE -DperformRlease clean verify &&
152+
$DRY_RUN mvn $PROFILE $ALT_REPOSITORY -DperformRelease -DupdateReleaseInfo=true deploy &&
149153
$DRY_RUN git checkout @{-1}
150154
fi

0 commit comments

Comments
 (0)