Skip to content

Commit 5d9c1fe

Browse files
chore(ci): Check every maven central version for android publish (#2512)
1 parent 94af35d commit 5d9c1fe

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

scripts/publish-android.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ publish_plugin () {
2020
# Get latest plugin info from MavenCentral
2121
PLUGIN_PUBLISHED_URL="https://repo1.maven.org/maven2/com/capacitorjs/$PLUGIN_NAME/maven-metadata.xml"
2222
PLUGIN_PUBLISHED_DATA=$(curl -s $PLUGIN_PUBLISHED_URL)
23-
PLUGIN_PUBLISHED_VERSION="$(perl -ne 'print and last if s/.*<latest>(.*)<\/latest>.*/\1/;' <<< $PLUGIN_PUBLISHED_DATA)"
2423

25-
if [[ $PLUGIN_VERSION == $PLUGIN_PUBLISHED_VERSION ]]; then
24+
if echo "$PLUGIN_PUBLISHED_DATA" | grep -q "<version>$PLUGIN_VERSION</version>"; then
2625
printf %"s\n\n" "Duplicate: a published plugin $PLUGIN_NAME exists for version $PLUGIN_VERSION, skipping..."
2726
else
2827
# Make log dir if doesnt exist

0 commit comments

Comments
 (0)