Skip to content

Commit 7707426

Browse files
committed
Properly handle missing Podfile
1 parent b58e2d9 commit 7707426

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

bin/build_and_test_pod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ LANE_NAME="${1:-test}"
66
echo "--- :rubygems: Setting up Gems"
77
install_gems
88

9-
echo "--- :cocoapods: Setting up Pods"
10-
install_cocoapods
9+
if [ -f "Podfile.lock" ]; then
10+
echo "--- :cocoapods: Setting up Pods"
11+
install_cocoapods
12+
fi
1113

1214
echo "--- :test_tube: Building and Running Tests"
1315

bin/lint_pod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#!/bin/bash -eu
22

33
echo "--- :rubygems: Setting up Gems"
4-
bundle install
4+
install_gems
55

66
echo "--- :rubygems: Checking Gemfile.lock"
77
validate_gemfile_lock
88

99
echo "--- :rubocop: Running Rubocop"
1010
bundle exec rubocop
1111

12-
echo "--- :cocoapods: Checking Podfile.lock"
13-
validate_podfile_lock
12+
if [ -f "Podfile.lock" ]; then
13+
echo "--- :cocoapods: Checking Podfile.lock"
14+
validate_podfile_lock
15+
fi
1416

1517
# TODO: Add swiftlint

bin/validate_podspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
echo "--- :rubygems: Setting up Gems"
44
install_gems
55

6-
echo "--- :cocoapods: Setting up Pods"
7-
install_cocoapods
6+
if [ -f "Podfile.lock" ]; then
7+
echo "--- :cocoapods: Setting up Pods"
8+
install_cocoapods
9+
fi
810

911
echo "--- :microscope: Validate Podspec"
1012
# For some reason this fixes a failure in `lib lint`

0 commit comments

Comments
 (0)