Skip to content

Commit b875128

Browse files
chore(ci): Check every maven central version for android publish (#82)
1 parent 5a68e10 commit b875128

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
@@ -17,9 +17,8 @@ publish_plugin_android () {
1717
# Get latest plugin info from MavenCentral
1818
PLUGIN_PUBLISHED_URL="https://repo1.maven.org/maven2/com/capacitorjs/$PLUGIN_NAME/maven-metadata.xml"
1919
PLUGIN_PUBLISHED_DATA=$(curl -s $PLUGIN_PUBLISHED_URL)
20-
PLUGIN_PUBLISHED_VERSION="$(perl -ne 'print and last if s/.*<latest>(.*)<\/latest>.*/\1/;' <<< $PLUGIN_PUBLISHED_DATA)"
2120

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

0 commit comments

Comments
 (0)