read_podspec
Community Action Reference: Inspected directly from Fastlane core ruby gem definitions.
Supported Platforms: ios, mac
Loads a CocoaPods spec as JSON
Details
This can be used for only specifying a version string in your podspec - and during your release process you’d read it from the podspec by running version = read_podspec['version'] at the beginning of your lane.
Loads the specified (or the first found) podspec in the folder as JSON, so that you can inspect its version, files etc.
This can be useful when basing your release process on the version string only stored in one place - in the podspec.
As one of the first steps you’d read the podspec and its version and the rest of the workflow can use that version string (when e.g. creating a new git tag or a GitHub Release).
Parameters & Options
Total options available: 1
| Key | Type | Env Variable | Default | Required | Description |
|---|---|---|---|---|---|
path |
String |
FL_READ_PODSPEC_PATH |
- |
Yes | Path to the podspec to be read |
Lane Context Shared Values
This action writes the following values to Actions.lane_context[SharedValues::...]:
| Key | Description |
|---|---|
SharedValues::READ_PODSPEC_JSON |
Podspec JSON payload |
Examples
spec = read_podspecversion = spec["version"]puts "Using Version #{version}"spec = read_podspec(path: "./XcodeServerSDK.podspec")Source & Upstream
- Gem Action:
read_podspec.rb - Upstream Source: Inspect Ruby Implementation on GitHub
- Authors:
czechboy0