Skip to content

Commit

Permalink
Merge pull request #4 from rh389/feature/ubuntu-support
Browse files Browse the repository at this point in the history
Add support for linux, test on ubuntu
  • Loading branch information
maxim-lobanov authored Mar 24, 2020
2 parents 89885df + dc08910 commit 9a10447
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
22 changes: 21 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,24 @@ jobs:
podfile-path: __tests__/podfile-example/Podfile3.lock

- name: Validate version
run: pod --version | grep "1.9.1"
run: pod --version | grep "1.9.1"

ubuntu-install:
name: install latest on ubuntu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: setup-ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6'

- name: setup-cocoapods
uses: ./
with:
version: latest

- name: Validate version
run: pod --version
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1573,8 +1573,8 @@ const core = __importStar(__webpack_require__(470));
const installer_1 = __webpack_require__(749);
const run = async () => {
try {
if (process.platform !== "darwin") {
throw new Error(`This task is intended only for macOS platform. It can't be run on '${process.platform}' platform`);
if (process.platform !== "darwin" && process.platform !== "linux") {
throw new Error(`This task is intended for macOS and linux platforms. It can't be run on '${process.platform}' platform`);
}
let versionSpec = core.getInput("version", { required: false });
const podfilePath = core.getInput("podfile-path", { required: false });
Expand Down
4 changes: 2 additions & 2 deletions src/setup-cocoapods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { CocoapodsInstaller } from "./installer";

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

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

0 comments on commit 9a10447

Please sign in to comment.