Skip to content

Commit

Permalink
Remove pod spec cat step
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Schmitt committed Aug 23, 2023
1 parent f203c34 commit f83bfa6
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 51 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
- name: Set up CocoaPods
run: |
sudo gem install cocoapods
pod repo update
- name: Build and run tests
run: npm rebuild && npm run all
Expand Down
19 changes: 2 additions & 17 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

15 changes: 1 addition & 14 deletions dist/pod.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "podspec-dependency-submission",
"version": "0.0.5",
"version": "0.0.6",
"description": "Podspec Dependency Submission",
"main": "dist/index.js",
"scripts": {
Expand Down
5 changes: 2 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
PackageCache
} from '@github/dependency-submission-toolkit'

import { processPodspec, processPod } from './pod'
import { processPodspec } from './pod'

import { PackageURL } from 'packageurl-js'

Expand All @@ -36,12 +36,11 @@ async function main () {
const manifest = new Manifest(podname, podspecPath)

dependencies.forEach(async (depName: string) => {
const podInfo = await processPod(depName)
const packageURL = new PackageURL(
'cocoapods',
null,
depName,
podInfo.version ?? null,
null,
null,
null
)
Expand Down
14 changes: 0 additions & 14 deletions src/pod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,3 @@ export async function processPodspec (

return [podspec.name, Object.keys(podspec.dependencies)]
}

export async function processPod (
podName: string
): Promise<Record<string, any>> {
console.log(`Running 'pod spec cat "${podName}"'`)
const podspec = await exec.getExecOutput('pod', ['spec', 'cat', podName])
if (podspec.exitCode !== 0) {
core.error(podspec.stderr)
core.setFailed("'pod ipc spec' failed!")
throw new Error("Failed to execute 'pod ipc spec' on podfile")
}

return JSON.parse(podspec.stdout)
}

0 comments on commit f83bfa6

Please sign in to comment.