Skip to content

Commit 15fdf4e

Browse files
committed
tmp
1 parent cd2f7cc commit 15fdf4e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.circleci/config.yml

Lines changed: 24 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,22 @@ jobs:
168173
}
169174
]
170175
}
176+
verify_branch:
177+
docker:
178+
- image: cimg/base:stable
179+
resource_class: small
180+
steps:
181+
- checkout
182+
- run:
183+
name: Verify version
184+
command: |
185+
VERSION=$(echo "${CIRCLE_BRANCH}" | sed -E "s/^release[\/-]v//")
186+
MAJOR=$(echo "${VERSION}" | cut -d. -f1)
187+
MINOR=$(echo "${VERSION}" | cut -d. -f2)
188+
echo "Version: ${VERSION} MAJOR: ${MAJOR} MINOR: ${MINOR}"
189+
if [[ "${MAJOR}" -eq 24 ]]; then
190+
if [[ "${MINOR}" -lt 6 ]]; then
191+
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)."
192+
exit 1
193+
fi
194+
fi

0 commit comments

Comments
 (0)