Skip to content

Commit 7bfe5a8

Browse files
Merge pull request #9 from pythoninthegrass/renovate/ruby-3.x
chore(deps): update dependency ruby to v3.4.8
2 parents e40cf08 + a2f3740 commit 7bfe5a8

5 files changed

Lines changed: 144 additions & 2 deletions

File tree

.github/workflows/build-ios-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Ruby
2121
uses: ruby/setup-ruby@v1
2222
with:
23-
ruby-version: '3.4'
23+
ruby-version: '3.4.8'
2424
bundler-cache: true
2525

2626
- name: Setup Node.js

.gitignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,61 @@ vite.config.js.timestamp-*
186186
vite.config.ts.timestamp-*
187187
.vite/
188188

189+
## Ruby
190+
*.gem
191+
*.rbc
192+
/.config
193+
/coverage/
194+
/InstalledFiles
195+
/pkg/
196+
/spec/reports/
197+
/spec/examples.txt
198+
/test/tmp/
199+
/test/version_tmp/
200+
/tmp/
201+
202+
# Ignore Byebug command history file.
203+
.byebug_history
204+
205+
## Specific to RubyMotion:
206+
.dat*
207+
.repl_history
208+
build/
209+
*.bridgesupport
210+
build-iPhoneOS/
211+
build-iPhoneSimulator/
212+
213+
## Specific to RubyMotion (use of CocoaPods):
214+
#
215+
# We recommend against adding the Pods directory to your .gitignore. However
216+
# you should judge for yourself, the pros and cons are mentioned at:
217+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
218+
#
219+
# vendor/Pods/
220+
221+
## Documentation cache and generated files:
222+
/.yardoc/
223+
/_yardoc/
224+
/doc/
225+
/rdoc/
226+
227+
## Environment normalization:
228+
/.bundle/
229+
/vendor/bundle
230+
/lib/bundler/man/
231+
232+
# for a library or gem, you might want to ignore these files since the code is
233+
# intended to run in multiple environments; otherwise, check them in:
234+
# Gemfile.lock
235+
# .ruby-version
236+
# .ruby-gemset
237+
238+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
239+
.rvmrc
240+
241+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
242+
# .rubocop-https?--*
243+
189244
# INCLUDE
190245
!**/*.example
191246
!**/.gitkeep

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
nodejs 24.12.0
2-
ruby 3.4.5
2+
ruby 3.4.8
33
rust 1.92.0

fastlane/Fastfile

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,25 @@ TEAM_ID = "654C9Y2C3F"
2222
OUTPUT_DIR = "#{ROOT_DIR}/src-tauri/gen/apple/build"
2323
IPA_PATH = "#{OUTPUT_DIR}/Lunch.ipa"
2424

25+
# Fix Tauri iOS project issue where Externals folder in sources causes
26+
# "Multiple commands produce libapp.a" error (both debug and release copied)
27+
# See: https://github.com/tauri-apps/tauri/issues/13578
28+
def fix_tauri_project_yml
29+
project_yml_path = "#{ROOT_DIR}/src-tauri/gen/apple/project.yml"
30+
return unless File.exist?(project_yml_path)
31+
32+
content = File.read(project_yml_path)
33+
# Remove "- path: Externals" from sources to prevent duplicate libapp.a
34+
# libapp.a is already linked via dependencies, no need to copy as resource
35+
if content.include?("- path: Externals")
36+
content.gsub!(/^\s*- path: Externals\n/, "")
37+
File.write(project_yml_path, content)
38+
UI.message("Fixed project.yml: removed Externals from sources")
39+
# Regenerate Xcode project with xcodegen
40+
sh("cd #{ROOT_DIR}/src-tauri/gen/apple && xcodegen generate")
41+
end
42+
end
43+
2544
# App Store Connect API Key configuration
2645
# Set these environment variables:
2746
# - APP_STORE_CONNECT_API_KEY_KEY_ID: API Key ID
@@ -121,6 +140,60 @@ platform :ios do
121140
)
122141
end
123142

143+
desc "Build only (no upload) - for testing"
144+
lane :build_only do
145+
configure_minio
146+
match(type: "appstore", readonly: true)
147+
148+
# Fix Tauri project.yml to prevent duplicate libapp.a error
149+
fix_tauri_project_yml
150+
151+
# Configure Xcode project signing before Tauri build
152+
update_code_signing_settings(
153+
use_automatic_signing: false,
154+
path: XCODEPROJ,
155+
team_id: TEAM_ID,
156+
bundle_identifier: APP_IDENTIFIER,
157+
profile_name: "match AppStore #{APP_IDENTIFIER}",
158+
code_sign_identity: "Apple Distribution"
159+
)
160+
161+
# TODO: move to separate xml file
162+
# Write custom ExportOptions.plist for app-store export
163+
export_options_path = "#{ROOT_DIR}/src-tauri/gen/apple/ExportOptions.plist"
164+
File.write(export_options_path, <<~PLIST)
165+
<?xml version="1.0" encoding="UTF-8"?>
166+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
167+
<plist version="1.0">
168+
<dict>
169+
<key>method</key>
170+
<string>app-store</string>
171+
<key>teamID</key>
172+
<string>#{TEAM_ID}</string>
173+
<key>signingStyle</key>
174+
<string>manual</string>
175+
<key>provisioningProfiles</key>
176+
<dict>
177+
<key>#{APP_IDENTIFIER}</key>
178+
<string>match AppStore #{APP_IDENTIFIER}</string>
179+
</dict>
180+
<key>uploadSymbols</key>
181+
<false/>
182+
</dict>
183+
</plist>
184+
PLIST
185+
186+
# Build using Tauri
187+
sh("cd #{ROOT_DIR}/src-tauri && npx tauri ios build --export-method app-store-connect")
188+
189+
# Find the built IPA
190+
tauri_ipa = "#{ROOT_DIR}/src-tauri/gen/apple/build/arm64/Lunch.ipa"
191+
FileUtils.mkdir_p(OUTPUT_DIR)
192+
FileUtils.cp(tauri_ipa, IPA_PATH) if File.exist?(tauri_ipa)
193+
194+
UI.success("Build complete! IPA at: #{IPA_PATH}")
195+
end
196+
124197
desc "Build and upload to TestFlight"
125198
lane :beta do
126199
configure_minio
@@ -142,6 +215,9 @@ platform :ios do
142215
sh("cd #{ROOT_DIR}/src-tauri && npx tauri ios init")
143216
end
144217

218+
# Fix Tauri project.yml to prevent duplicate libapp.a error
219+
fix_tauri_project_yml
220+
145221
# Configure Xcode project signing before Tauri build
146222
update_code_signing_settings(
147223
use_automatic_signing: false,
@@ -216,6 +292,9 @@ platform :ios do
216292
sh("cd #{ROOT_DIR}/src-tauri && npx tauri ios init")
217293
end
218294

295+
# Fix Tauri project.yml to prevent duplicate libapp.a error
296+
fix_tauri_project_yml
297+
219298
# Configure Xcode project signing before Tauri build
220299
update_code_signing_settings(
221300
use_automatic_signing: false,

fastlane/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
2323

2424
Sync code signing certificates
2525

26+
### ios build_only
27+
28+
```sh
29+
[bundle exec] fastlane ios build_only
30+
```
31+
32+
Build only (no upload) - for testing
33+
2634
### ios beta
2735

2836
```sh

0 commit comments

Comments
 (0)