Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ workflows:
- macos-job:
name: CocoaPods
cocoapods: true
- verify_branch:
name: Verify branch
notify_release:
jobs:
- notify_release:
Expand Down Expand Up @@ -168,3 +170,24 @@ jobs:
}
]
}
verify_branch:
docker:
- image: cimg/base:stable
resource_class: small
steps:
- run:
name: Verify version
command: |
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."
if [[ ${CIRCLE_BRANCH} == release* ]]; then
VERSION=$(echo "${CIRCLE_BRANCH}" | sed -E "s/^release[\/-]v//")
MAJOR=$(echo "${VERSION}" | cut -d. -f1)
MINOR=$(echo "${VERSION}" | cut -d. -f2)
echo "Version: ${VERSION} MAJOR: ${MAJOR} MINOR: ${MINOR}"
if [[ "${MAJOR}" -eq 24 ]]; then
if [[ "${MINOR}" -lt 6 ]]; then
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)."
exit 1
fi
fi
fi