Skip to content

Commit da2283f

Browse files
committed
Skip before_all checks using next if to avoid extra indentation
h/t @mokagio
1 parent 6d25498 commit da2283f

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

fastlane/Fastfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ end
1515

1616
before_all do |lane|
1717
# Skip these checks/steps for test lane (not needed for testing)
18-
unless lane == :test_without_building
19-
# Check that the env files exist
20-
unless is_ci || File.file?(USER_ENV_FILE_PATH)
21-
UI.user_error!("~/.wcios-env.default not found: Please copy env/user.env-example to #{USER_ENV_FILE_PATH} and fill in the values")
22-
end
23-
unless File.file?(PROJECT_ENV_FILE_PATH)
24-
UI.user_error!("project.env not found: Make sure your configuration is up to date with `rake dependencies`")
25-
end
18+
next if lane == :test_without_building
2619

27-
# This allows code signing to work on CircleCI
28-
# It is skipped if this isn't running on CI
29-
# See https://circleci.com/docs/2.0/ios-codesigning/
30-
setup_circle_ci
20+
# Check that the env files exist
21+
unless is_ci || File.file?(USER_ENV_FILE_PATH)
22+
UI.user_error!("~/.wcios-env.default not found: Please copy env/user.env-example to #{USER_ENV_FILE_PATH} and fill in the values")
3123
end
24+
unless File.file?(PROJECT_ENV_FILE_PATH)
25+
UI.user_error!("project.env not found: Make sure your configuration is up to date with `rake dependencies`")
26+
end
27+
28+
# This allows code signing to work on CircleCI
29+
# It is skipped if this isn't running on CI
30+
# See https://circleci.com/docs/2.0/ios-codesigning/
31+
setup_circle_ci
3232
end
3333

3434
platform :ios do

0 commit comments

Comments
 (0)