forked from algolia/algoliasearch-client-java-legacy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·28 lines (21 loc) · 725 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
mvn -Darguments="-DskipTests" release:prepare
mvn -Darguments="-DskipTests" release:perform
sleep 5
MVN_REP=`mvn nexus-staging:rc-list | grep comalgolia`
if [[ $MVN_REP == *"[INFO]"* ]]
then
REP_ID=`echo $MVN_REP | cut -d" " -f2`
else
REP_ID=`echo $MVN_REP | cut -d" " -f1`
fi
if [ -z "$REP_ID" ]; then
echo "Can not find a REP_ID"
exit 1
fi
echo "----------------------"
echo "REP_ID found: $REP_ID"
echo "----------------------"
sleep 15 #sleep longer
mvn nexus-staging:close -DstagingRepositoryId="$REP_ID" || mvn nexus-staging:close -DstagingRepositoryId="$REP_ID"
mvn nexus-staging:release -DstagingRepositoryId="$REP_ID" || mvn nexus-staging:release -DstagingRepositoryId="$REP_ID"