Skip to content

Commit 89d0dfa

Browse files
committed
tmp
1 parent cd2f7cc commit 89d0dfa

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ workflows:
1717
- macos-job:
1818
name: CocoaPods
1919
cocoapods: true
20+
- verify_branch:
21+
name: Verify branch
22+
filters:
23+
branches:
24+
only: /^release.*/
2025
notify_release:
2126
jobs:
2227
- notify_release:
@@ -168,3 +173,21 @@ jobs:
168173
}
169174
]
170175
}
176+
verify_branch:
177+
machine:
178+
image: ubuntu-2004:202010-01
179+
steps:
180+
- checkout
181+
- run:
182+
name: Verify version
183+
command: |
184+
VERSION=$(echo "${CIRCLE_BRANCH}" | sed -E "s/^release[\/-]v//")
185+
MAJOR=$(echo "${VERSION}" | cut -d. -f1)
186+
MINOR=$(echo "${VERSION}" | cut -d. -f2)
187+
echo "Version: ${VERSION} MAJOR: ${MAJOR} MINOR: ${MINOR}"
188+
if [[ "${MAJOR}" -eq 24 ]]; then
189+
if [[ "${MINOR}" -lt 6 ]]; then
190+
echo "Version ${VERSION} is not allowed to be released from the main branch because of incorrect dependencies in SPM. Please use lts branch (see lts/v24.5 for example)."
191+
exit 1
192+
fi
193+
fi

0 commit comments

Comments
 (0)