File tree Expand file tree Collapse file tree 1 file changed +19
-3
lines changed
Expand file tree Collapse file tree 1 file changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,7 @@ mod download {
3232 }
3333
3434 #[ cfg( all( target_os = "macos" , target_arch = "aarch64" ) ) ]
35- fn download_filename ( ) -> String {
36- format ! ( "bitcoin-{}-arm64-apple-darwin.tar.gz" , & VERSION )
37- }
35+ fn download_filename ( ) -> String { format ! ( "bitcoin-{}-arm64-apple-darwin.tar.gz" , & VERSION ) }
3836
3937 #[ cfg( all( target_os = "linux" , target_arch = "x86_64" ) ) ]
4038 fn download_filename ( ) -> String { format ! ( "bitcoin-{}-x86_64-linux-gnu.tar.gz" , & VERSION ) }
@@ -160,6 +158,24 @@ mod download {
160158 }
161159 }
162160 }
161+
162+ // Code signing for arm64 macOS:
163+ #[ cfg( all( target_os = "macos" , target_arch = "aarch64" ) ) ]
164+ {
165+ use std:: process:: Command ;
166+ let status = Command :: new ( "codesign" )
167+ . arg ( "-s" )
168+ . arg ( "-" )
169+ . arg ( existing_filename. to_str ( ) . unwrap ( ) )
170+ . status ( )
171+ . with_context ( || "failed to execute codesign" ) ?;
172+ if !status. success ( ) {
173+ return Err ( anyhow:: anyhow!(
174+ "codesign failed with exit code {}" ,
175+ status. code( ) . unwrap_or( -1 )
176+ ) ) ;
177+ }
178+ }
163179 }
164180 Ok ( ( ) )
165181 }
You can’t perform that action at this time.
0 commit comments