Skip to content

Commit 70a2a40

Browse files
authored
Fixes Docker and Cocoapods builds (#4317)
* Use Path API * Tries to fix cocoa pods release * Uses include paths * Fixes cocoapods build as well * Bumps docker version
1 parent 14d33aa commit 70a2a40

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ENV CXX=/usr/bin/clang++-14
3838
RUN wget "https://sh.rustup.rs" -O rustup.sh \
3939
&& sh rustup.sh -y
4040
ENV PATH="/root/.cargo/bin:${PATH}"
41-
RUN rustup default nightly-2024-06-13
41+
RUN rustup default nightly-2025-01-16
4242
RUN cargo install --force cbindgen \
4343
&& rustup target add wasm32-unknown-emscripten
4444

codegen-v2/src/codegen/cpp/code_gen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fn generate_header_includes(file: &mut std::fs::File, info: &TWConfig) -> Result
3838
continue;
3939
}
4040
if included_headers.insert(header_name.clone()) {
41-
if let Ok(true) = fs::exists(format!("{}{}.h", HEADER_IN_DIR, header_name)) {
41+
if std::path::Path::new(&format!("{}{}.h", HEADER_IN_DIR, header_name)).exists() {
4242
writeln!(file, "#include <TrustWalletCore/{}.h>", header_name)?;
4343
} else {
4444
writeln!(file, "#include <TrustWalletCore/Generated/{}.h>", header_name)?;

tools/ios-release

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ Pod::Spec.new do |s|
5959
http: '${download_url}'
6060
}
6161
s.default_subspec = 'Core'
62+
63+
s.prepare_command = <<-CMD
64+
find include -name "*.h" -print0 | xargs -0 sed -i '' 's/\\\(<\\\)TrustWalletCore\\\/Generated\\\/\\\(.*\\\)\\\(>\\\)/\\\"\\\2\\\"/'
65+
find include -name "*.h" -print0 | xargs -0 sed -i '' 's/\\\(<\\\)TrustWalletCore\\\/\\\(.*\\\)\\\(>\\\)/\\\"\\\2\\\"/'
66+
CMD
67+
6268
s.subspec 'Types' do |ss|
6369
ss.source_files =
6470
'Sources/Types/*.swift',

0 commit comments

Comments
 (0)