Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ios_emerge_upload_adhoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
SIGNING_KEY_PASSWORD: ${{ secrets.IOS_DIST_SIGNING_KEY_PASSWORD }}
SIGNING_KEY_FILE_PATH: signing-cert.p12
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }}
CONFIGURATION: AdHoc
EMERGE_BUILD_TYPE: pull-request-adhoc
PROV_PROFILE_NAME: HackerNews AdHoc Distribution
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios_emerge_upload_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
SIGNING_KEY_PASSWORD: ${{ secrets.IOS_DIST_SIGNING_KEY_PASSWORD }}
SIGNING_KEY_FILE_PATH: signing-cert.p12
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }}
CONFIGURATION: Release
EMERGE_BUILD_TYPE: release

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ios_emerge_upload_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ jobs:
SIGNING_KEY_PASSWORD: ${{ secrets.IOS_DIST_SIGNING_KEY_PASSWORD }}
SIGNING_KEY_FILE_PATH: signing-cert.p12
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_KEY }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_SENTRY_AUTH_TOKEN }}
CONFIGURATION: Release
EMERGE_BUILD_TYPE: pull-request
76 changes: 0 additions & 76 deletions .github/workflows/ios_sentry_upload_pr.yml

This file was deleted.

2 changes: 1 addition & 1 deletion ios/HackerNews/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Created by Trevor Elkins on 6/20/23..
//

import SwiftUI
import Common
import SwiftUI

struct ContentView: View {

Expand Down
55 changes: 51 additions & 4 deletions ios/fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ platform :ios do
build_app_for_scheme(build_configuration: 'Release')
upload_app
emerge(tag: ENV['EMERGE_BUILD_TYPE'])
thin_asset_catalogs
sentry_debug_files_upload(
auth_token: ENV['SENTRY_AUTH_TOKEN'],
org_slug: 'emerge-tools',
Expand All @@ -170,8 +171,8 @@ platform :ios do
)
sentry_upload_mobile_app(
auth_token: ENV['SENTRY_AUTH_TOKEN'],
org_slug: 'emerge-tools',
project_slug: 'hackernews-ios'
org_slug: 'sentry',
project_slug: 'launchpad-test-ios'
)
end

Expand All @@ -184,10 +185,11 @@ platform :ios do
tag: ENV['EMERGE_BUILD_TYPE'],
app_id_suffix: ENV['APP_ID_SUFFIX']
)
thin_asset_catalogs
sentry_upload_mobile_app(
auth_token: ENV['SENTRY_AUTH_TOKEN'],
org_slug: 'emerge-tools',
project_slug: 'hackernews-ios'
org_slug: 'sentry',
project_slug: 'launchpad-test-ios'
)
end

Expand All @@ -196,6 +198,51 @@ platform :ios do
emerge_snapshot(scheme: "HackerNews")
end

desc 'Thin asset catalogs in XCArchive'
lane :thin_asset_catalogs do |options|
UI.message('Finding and thinning asset catalogs in XCArchive...')

xcarchive_path = lane_context[SharedValues::XCODEBUILD_ARCHIVE]
UI.message("Using archive: #{xcarchive_path}")

Dir.chdir('..') do
car_files = Dir.glob("#{xcarchive_path}/**/*.app/**/*.car")

if car_files.empty?
UI.message("No .car files found in XCArchive")
else
car_files.each do |car_file|
UI.message("Found asset catalog: #{car_file}")

backup_file = "#{car_file}.backup"
FileUtils.cp(car_file, backup_file)

command = [
'assetutil',
'-i', 'phone',
'-s', '3',
'-p', 'P3',
'-M', '4',
'-g', 'MTL6,1',
'-r', '13.0',
car_file,
'-o', car_file
]

success = system(*command)

if success
UI.success("Successfully thinned: #{car_file}")
FileUtils.rm(backup_file)
else
UI.error("Failed to thin: #{car_file}, restoring backup")
FileUtils.mv(backup_file, car_file)
end
end
end
end
end

desc 'Build the iOS app only (no uploads)'
lane :build_only do
load_asc_api_key
Expand Down
Loading