Skip to content

Commit fbf33d3

Browse files
committed
Update
1 parent cfcadee commit fbf33d3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scripts/bump-version.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ PODSPEC_VERSION=${BASH_REMATCH[2]}
3737
# Find the line number of the last entry in the compatibility table and insert the new entry after it
3838
README_FILE="README.md"
3939

40+
# Check if an entry with the same KMP version and Cocoa version already exists
41+
EXISTING_ENTRY=$(grep "| $NEW_VERSION" $README_FILE 2>/dev/null | grep "$PODSPEC_VERSION" 2>/dev/null || true)
42+
43+
if [ -n "$EXISTING_ENTRY" ]; then
44+
echo "Found same KMP and Cocoaversion in the compatibility table. Skipping addition to avoid duplicate."
45+
exit 0
46+
fi
47+
4048
# We'll look for the last line that matches the table entry pattern (starts with | and contains version numbers)
4149
LAST_TABLE_LINE=$(grep -n "^| [0-9]" $README_FILE | tail -1 | cut -d: -f1)
4250

0 commit comments

Comments
 (0)