Skip to content

Commit

Permalink
[#454] Add variables to env
Browse files Browse the repository at this point in the history
  • Loading branch information
nkhanh44 committed Oct 29, 2023
1 parent 9bc4e21 commit 72545b1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
KEY_ID=""
ISSUER_ID=""
KEY=""
6 changes: 6 additions & 0 deletions fastlane/Constants/Constant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ enum Constant {
static let appleProductionTeamId = "<#teamId#>"
static let keychainName = "{PROJECT_NAME}_keychain"
static let matchURL = "[email protected]:{organization}/{repo}.git"
static let apiKey: [String: Any] = [
"key_id" : EnvironmentParser.string(key: "KEY_ID"),
"issuer_id": EnvironmentParser.string(key: "ISSUER_ID"),
"key": EnvironmentParser.string(key: "KEY"),
"in_house": false
]

// MARK: - Path

Expand Down
9 changes: 1 addition & 8 deletions fastlane/Fastfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,7 @@ class Fastfile: LaneFile {
registerDevice(
name: deviceName,
udid: deviceUDID,
apiKey: .userDefined(
[
"key_id" : EnvironmentParser.string(key: "KEY_ID"),
"issuer_id": EnvironmentParser.string(key: "ISSUER_ID"),
"key": EnvironmentParser.string(key: "KEY"),
"in_house": false
]
),
apiKey: .userDefined(Constant.apiKey),
teamId: .userDefined(Constant.appleStagingTeamId)
)

Expand Down
9 changes: 1 addition & 8 deletions fastlane/Helpers/Match.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@ enum Match {
type: type.match,
readonly: .userDefined(!isForce),
appIdentifier: [environment.bundleId],
apiKey: .userDefined(
[
"key_id" : EnvironmentParser.string(key: "KEY_ID"),
"issuer_id": EnvironmentParser.string(key: "ISSUER_ID"),
"key": EnvironmentParser.string(key: "KEY"),
"in_house": false
]
),
apiKey: .userDefined(Constant.apiKey),
username: .userDefined(environment.appleUsername),
teamId: .userDefined(environment.appleTeamId),
gitUrl: Constant.matchURL,
Expand Down

0 comments on commit 72545b1

Please sign in to comment.