Skip to content

Commit

Permalink
Update fastfile
Browse files Browse the repository at this point in the history
  • Loading branch information
magkue committed Nov 12, 2024
1 parent 4f75d01 commit d9a8dbd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test-ios-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ jobs:
- name: Check static code quality of iOS App
run: bundle exec fastlane swift_lint

- name: Run Unit and UI Tests
run: bundle exec fastlane test
# - name: Run Unit and UI Tests
# run: bundle exec fastlane test

- name: Build iOS App
run: bundle exec fastlane build
Expand Down
40 changes: 10 additions & 30 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ platform :ios do
lane :build do
app_identifier = CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)
team_id = CredentialsManager::AppfileConfig.try_fetch_value(:team_id)
keychain_name = "signing"
keychain_password = "temp"


##########################################
# Environment Setup
##########################################
Expand All @@ -64,51 +62,29 @@ platform :ios do
value: ENV['BUILD_NUMBER']
)

delete_keychain(
name: keychain_name
) if File.exist? File.expand_path("~/Library/Keychains/#{keychain_name}-db")

create_keychain(
name: keychain_name,
password: keychain_password,
default_keychain: true,
unlock: true,
timeout: 3600,
add_to_search_list: true
unlock_keychain(
path: "~/Library/Keychains/login-db",
password: ENV[IOS_KEYCHAIN_PASSWORD],
)

##########################################
# Configure Code Signing via Match
##########################################

match(
type: "appstore",
api_key: api_key,
app_identifier: app_identifier,
git_branch: "main", # branch to store and get certificates from
git_full_name: "Artemis IOS",
clone_branch_directly: true, # optional
git_user_email: "[email protected]",
git_url: "https://gitlab.lrz.de/ase/ipraktikum/match-code-signing",
readonly: false,
force: true,
git_basic_authorization: ENV['IOS_MATCH_GITLAB_AUTH'], # Base-64 encoded, format gitlab_auth_token_name:gitlab_auth_token
keychain_name: keychain_name,
keychain_password: keychain_password, # Keychain password to store cert (using the default login keychain)
verbose: true # optional but very helpful
)

##########################################
# Project Setup
##########################################

# Update AppID for publishing
update_app_identifier(
plist_path: info_plist_path
)

##########################################
# Code sign and Build
# Build
##########################################

# Build the app
Expand All @@ -121,6 +97,10 @@ platform :ios do
derived_data_path: ".DerivedData", # Custom derived data path
output_directory: "./build", # Directory where the output artifacts are generated
scheme: "Artemis",
export_options: {
compileBitcode: false,
provisioningProfiles: SharedValues::MATCH_PROVISIONING_PROFILE_MAPPING
},
xcargs: "-skipMacroValidation -skipPackagePluginValidation"
)
end
Expand Down

0 comments on commit d9a8dbd

Please sign in to comment.