-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add lane to fetch/update dev certificates #16
Changes from 1 commit
a7c52ce
54db3f6
c71c084
3250c73
6aa0f21
f84d787
68d5667
d4e9a84
2bfad90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,8 @@ USER_ENV_FILE_PATH = File.join(Dir.home, '.a8c-apps', ENV_FILE_NAME) | |
import 'lib/helpers.rb' | ||
|
||
before_all do | ||
setup_ci if runner.current_platform == :ios | ||
|
||
Dotenv.load(USER_ENV_FILE_PATH) | ||
end | ||
|
||
|
@@ -98,20 +100,31 @@ platform :ios do | |
end | ||
|
||
desc 'Sets up code signing' | ||
lane :set_up_code_signing do |options| | ||
require_env_vars!(*ASC_API_KEY_ENV_VARS, *MATCH_ENV_VARS) | ||
lane :set_up_code_signing_app_store do |readonly: true| | ||
_set_up_code_signing(type: 'appstore', readonly: readonly) | ||
end | ||
|
||
lane :set_up_code_signing_deveploment do |readonly: true| | ||
_set_up_code_signing(type: 'development', readonly: readonly) | ||
end | ||
|
||
def _set_up_code_signing(type:, readonly: true) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the underscore meant to signify that this method shouldn't be called directly? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually... 🤔 My original intention was do distinguish the name of the method from the name of the lane, but there is no Prefixing names with underscore is a convention in some environments to mark the prefixed thing as private, e.g. https://stackoverflow.com/a/15072306/809944 But your question made me wonder whether my assumption that a lane and a method with the same name cannot coexist is correct. Turns out it isn't. I created a Clearly the Fastlane DSL parser can distinguish between lanes and methods 😅 Furthermore, I added this to +
+lane :test_lane do
+ puts 'hi'
+ test_lane
+end
+
+def test_lane
+ puts 'hello'
+end And I got this output
Finally, it looks like Fastlane will give precedence to methods when running into a name clash lane :other do
test_lane # which will it call? the method or the lane?
end
|
||
require_env_vars!(*MATCH_ENV_VARS) | ||
|
||
setup_ci | ||
unless readonly | ||
require_env_vars!(*ASC_API_KEY_ENV_VARS) | ||
api_key = app_store_connect_api_key | ||
end | ||
|
||
shared_options = { | ||
type: 'appstore', | ||
type: type, | ||
app_identifier: BUNDLE_IDENTIFIER, | ||
team_id: 'PZYM8XX95Q', | ||
storage_mode: 's3', | ||
s3_region: 'us-east-2', | ||
s3_bucket: 'a8c-fastlane-match', | ||
readonly: options.fetch(:readonly, true), | ||
api_key: app_store_connect_api_key | ||
readonly: readonly, | ||
api_key: api_key | ||
} | ||
|
||
sync_code_signing( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, we are only using iOS at the moment.
But given the app is built with React Native, this will save us a warning/error if we'll ever run with
platform :android