diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b470e00..69a93307 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,6 +17,11 @@ workflows: - macos-job: name: CocoaPods cocoapods: true + - verify_branch: + name: Verify branch + filters: + branches: + only: /^release.*/ notify_release: jobs: - notify_release: @@ -168,3 +173,22 @@ jobs: } ] } + verify_branch: + docker: + - image: cimg/base:stable + resource_class: small + steps: + - checkout + - run: + name: Verify version + command: | + 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 \ No newline at end of file diff --git a/Package.swift b/Package.swift index 6bd1086e..65978252 100644 --- a/Package.swift +++ b/Package.swift @@ -5,7 +5,7 @@ import PackageDescription import Foundation let commonVersion = "24.10.1" -let commonChecksum = "49b24e8b2def452aca40f8ecb3f3986a7d242dda295dd7af8ad4be3c96a8bb5f" +let commonChecksum = "bad checksum to prevent automerge" let turfVersion: Version = "4.0.0"