File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,19 +41,20 @@ jobs:
4141 id : current_version
4242 run : |
4343 # Extract current version from NewRelicVideoAgent.podspec
44- CURRENT_VERSION=$(grep "s.version" NewRelicVideoAgent.podspec | sed -E "s/.*s\.version[[:space:]]*=[[:space:]]*'([0-9]+\.[0-9]+\.[0-9]+)'.*/\1/")
45-
44+ # Match only the line with s.version assignment, not s.source
45+ CURRENT_VERSION=$(grep -E "^\s*s\.version\s*=" NewRelicVideoAgent.podspec | sed -E "s/.*'([0-9]+\.[0-9]+\.[0-9]+)'.*/\1/")
46+
4647 if [ -z "$CURRENT_VERSION" ]; then
4748 echo "Failed to extract current version from podspec"
4849 exit 1
4950 fi
50-
51+
5152 # Validate semantic version format
5253 if ! [[ "$CURRENT_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
5354 echo "Invalid version format: $CURRENT_VERSION"
5455 exit 1
5556 fi
56-
57+
5758 echo "current_version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
5859 echo "Current version from podspec: $CURRENT_VERSION"
5960
You can’t perform that action at this time.
0 commit comments