Skip to content

Commit 43ede7a

Browse files
author
Maxim Lobanov
committed
apply --no-document for gem to speed up installation
1 parent 52a2f52 commit 43ede7a

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ jobs:
4949
run: gem uninstall cocoapods --all --executables
5050

5151
- name: Install needed version
52-
run: gem install cocoapods -v 1.8.1
52+
run: gem install cocoapods -v 1.9.1
5353

5454
- name: setup-cocoapods
5555
uses: ./
5656
with:
57-
version: 1.8.1
57+
version: 1.9.1
5858

5959
- name: Validate version
60-
run: pod --version | grep "1.8.1"
60+
run: pod --version | grep "1.9.1"
6161

6262
version-latest:
6363
name: install latest version

dist/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,9 +1514,10 @@ class CocoapodsInstaller {
15141514
}
15151515
// Remove pre-installed version of Cocoapods
15161516
exec.exec("gem", ["uninstall", "cocoapods", "--all", "--executables"]);
1517+
core.info("debug");
15171518
// Install new version of Cocoapods
1518-
// const versionArguments = (versionSpec === "latest") ? [] : ["-v", versionSpec];
1519-
// await exec.exec("gem", ["install", "cocoapods", ...versionArguments]);
1519+
const versionArguments = (versionSpec === "latest") ? [] : ["-v", versionSpec];
1520+
await exec.exec("gem", ["install", "cocoapods", ...versionArguments, "-​-no-document"]);
15201521
core.info(`Cocoapods ${versionSpec} has been installed successfully`);
15211522
}
15221523
static getVersionFromPodfile(podfilePath) {

src/installer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ export class CocoapodsInstaller {
1818
// Remove pre-installed version of Cocoapods
1919
exec.exec("gem", ["uninstall", "cocoapods", "--all", "--executables"]);
2020

21+
core.info("debug");
2122
// Install new version of Cocoapods
22-
// const versionArguments = (versionSpec === "latest") ? [] : ["-v", versionSpec];
23-
// await exec.exec("gem", ["install", "cocoapods", ...versionArguments]);
23+
const versionArguments = (versionSpec === "latest") ? [] : ["-v", versionSpec];
24+
await exec.exec("gem", ["install", "cocoapods", ...versionArguments, "--no-document"]);
2425

2526
core.info(`Cocoapods ${versionSpec} has been installed successfully`);
2627
}

0 commit comments

Comments
 (0)