Skip to content

Commit 37c1f4f

Browse files
committed
[ci] Add a check to make sure we will not release v24.0 - v24.5 with wrong Turf dependency.
1 parent cd2f7cc commit 37c1f4f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.circleci/config.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ workflows:
1717
- macos-job:
1818
name: CocoaPods
1919
cocoapods: true
20+
- verify_branch:
21+
name: Verify branch
2022
notify_release:
2123
jobs:
2224
- notify_release:
@@ -168,3 +170,24 @@ jobs:
168170
}
169171
]
170172
}
173+
verify_branch:
174+
docker:
175+
- image: cimg/base:stable
176+
resource_class: small
177+
steps:
178+
- run:
179+
name: Verify version
180+
command: |
181+
echo "We check branch here instead of running job with filter because we need to run it on every PR to make job mandatory in GH."
182+
if [[ ${CIRCLE_BRANCH} == release* ]]; then
183+
VERSION=$(echo "${CIRCLE_BRANCH}" | sed -E "s/^release[\/-]v//")
184+
MAJOR=$(echo "${VERSION}" | cut -d. -f1)
185+
MINOR=$(echo "${VERSION}" | cut -d. -f2)
186+
echo "Version: ${VERSION} MAJOR: ${MAJOR} MINOR: ${MINOR}"
187+
if [[ "${MAJOR}" -eq 24 ]]; then
188+
if [[ "${MINOR}" -lt 6 ]]; then
189+
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)."
190+
exit 1
191+
fi
192+
fi
193+
fi

0 commit comments

Comments
 (0)