Skip to content

Commit 498a5de

Browse files
committed
Add support for linux, test on ubuntu
1 parent 89885df commit 498a5de

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

.github/workflows/test.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,19 @@ jobs:
103103
podfile-path: __tests__/podfile-example/Podfile3.lock
104104

105105
- name: Validate version
106-
run: pod --version | grep "1.9.1"
106+
run: pod --version | grep "1.9.1"
107+
108+
ubuntu-install:
109+
name: install latest version
110+
runs-on: ubuntu-latest
111+
steps:
112+
- name: Checkout
113+
uses: actions/checkout@v2
114+
115+
- name: setup-cocoapods
116+
uses: ./
117+
with:
118+
version: latest
119+
120+
- name: Validate version
121+
run: pod --version

dist/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1573,8 +1573,8 @@ const core = __importStar(__webpack_require__(470));
15731573
const installer_1 = __webpack_require__(749);
15741574
const run = async () => {
15751575
try {
1576-
if (process.platform !== "darwin") {
1577-
throw new Error(`This task is intended only for macOS platform. It can't be run on '${process.platform}' platform`);
1576+
if (process.platform !== "darwin" && process.platform !== "linux") {
1577+
throw new Error(`This task is intended for macOS and linux platforms. It can't be run on '${process.platform}' platform`);
15781578
}
15791579
let versionSpec = core.getInput("version", { required: false });
15801580
const podfilePath = core.getInput("podfile-path", { required: false });

src/setup-cocoapods.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { CocoapodsInstaller } from "./installer";
33

44
const run = async (): Promise<void> => {
55
try {
6-
if (process.platform !== "darwin") {
7-
throw new Error(`This task is intended only for macOS platform. It can't be run on '${process.platform}' platform`);
6+
if (process.platform !== "darwin" && process.platform !== "linux") {
7+
throw new Error(`This task is intended for macOS and linux platforms. It can't be run on '${process.platform}' platform`);
88
}
99

1010
let versionSpec = core.getInput("version", { required: false });

0 commit comments

Comments
 (0)