Skip to content

Commit 9a10447

Browse files
Merge pull request #4 from rh389/feature/ubuntu-support
Add support for linux, test on ubuntu
2 parents 89885df + dc08910 commit 9a10447

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

.github/workflows/test.yml

+21-1
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,24 @@ 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 on ubuntu
110+
runs-on: ubuntu-latest
111+
steps:
112+
- name: Checkout
113+
uses: actions/checkout@v2
114+
115+
- name: setup-ruby
116+
uses: actions/setup-ruby@v1
117+
with:
118+
ruby-version: '2.6'
119+
120+
- name: setup-cocoapods
121+
uses: ./
122+
with:
123+
version: latest
124+
125+
- name: Validate version
126+
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)