Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 06d8bf8

Browse files
committed
chore(setup-release): Drop any previous repository
1 parent 2a9c91e commit 06d8bf8

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

tools/setup-release.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,19 @@ EOF
8484
</settings>
8585
EOF
8686

87-
MVN_REPO_ID=`mvn --settings mvn-settings.xml nexus-staging:rc-list | grep comalgolia | cut -d' ' -f 2`
88-
if test -z $MVN_REPO_ID; then
89-
echo "No repository was currently open."
90-
else
91-
echo "Existing repository to close: $MVN_REPO_ID"
92-
mvn --settings=mvn-settings.xml nexus-staging:drop -DstagingRepositoryId=$MVN_REPO_ID
93-
fi
94-
87+
MVN_REPO_ID=firsttry
88+
while test -z $MVN_REPO_ID #TODO: Avoid do while by getting every ID from the next call
89+
MVN_REPO_ID=`mvn --settings mvn-settings.xml nexus-staging:rc-list | grep comalgolia | cut -d' ' -f 2`
90+
if test -z $MVN_REPO_ID; then
91+
echo "No repository was currently open."
92+
break;
93+
else
94+
echo "Existing repository to close: $MVN_REPO_ID"
95+
mvn --settings=mvn-settings.xml nexus-staging:drop -DstagingRepositoryId=$MVN_REPO_ID
96+
fi
97+
do
98+
:
99+
done
95100
echo "Removing maven-related files..."
96101
rm pom.xml
97102
rm mvn-settings.xml

0 commit comments

Comments
 (0)