File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,19 +33,13 @@ jobs:
3333 run : |
3434 set -euo pipefail
3535
36- read -r VERSION SOURCE_TAG < <(
37- python3 - <<'PY'
38- import pathlib
39- import re
40-
41- text = pathlib.Path("CocoaMQTT.podspec").read_text(encoding="utf-8")
42- version = re.search(r's\.version\s*=\s*"([^"]+)"', text)
43- source_tag = re.search(r':tag\s*=>\s*"([^"]+)"', text)
44- if not version or not source_tag:
45- raise SystemExit("Failed to parse version or source tag from CocoaMQTT.podspec")
46- print(version.group(1), source_tag.group(1))
47- PY
48- )
36+ VERSION="$(ruby -ne 'puts $1 if /s\.version\s*=\s*"([^"]+)"/' CocoaMQTT.podspec)"
37+ SOURCE_TAG="$(ruby -ne 'puts $1 if /:tag\s*=>\s*"([^"]+)"/' CocoaMQTT.podspec)"
38+
39+ if [ -z "${VERSION}" ] || [ -z "${SOURCE_TAG}" ]; then
40+ echo "Failed to parse version or source tag from CocoaMQTT.podspec"
41+ exit 1
42+ fi
4943
5044 if [ "${VERSION}" != "${SOURCE_TAG}" ]; then
5145 echo "podspec version (${VERSION}) must match source tag (${SOURCE_TAG})"
You can’t perform that action at this time.
0 commit comments