@@ -17,11 +17,8 @@ async function run() {
1717 let platforms = core . getInput ( 'platforms' , { required : false } )
1818 let xcconfig = core . getInput ( 'xcconfig' , { required : false } )
1919
20- // install mint if its not installed
21- await installUsingBrewIfRequired ( "mint" )
22-
23- // install ourselves if not installed
24- await installUsingMintIfRequired ( 'swift-create-xcframework' , 'unsignedapps/swift-create-xcframework' )
20+ // Install using github if needed
21+ await installUsingGithubIfRequired ( )
2522
2623 // put together our options
2724 var options = [ '--zip' , '--github-action' ]
@@ -60,7 +57,7 @@ async function run() {
6057 } )
6158 }
6259
63- await runUsingMint ( 'swift-create-xcframework' , options )
60+ await runCommand ( 'swift-create-xcframework' , options )
6461
6562 let client = artifact . create ( )
6663 let files = fs . readFileSync ( outputPath , { encoding : 'utf8' } )
@@ -78,32 +75,26 @@ async function run() {
7875 }
7976}
8077
81- async function installUsingBrewIfRequired ( package ) {
82- if ( await isInstalled ( package ) ) {
83- core . info ( package + " is already installed." )
84-
78+ async function installUsingGithubIfRequired ( ) {
79+ if ( await isInstalled ( "swift-create-xcframework" ) ) {
80+ core . info ( "swift-create-xcframework is already installed" )
8581 } else {
86- core . info ( "Installing " + package )
87- await exec . exec ( 'brew' , [ 'install' , package ] )
82+ core . info ( "Installing swift-create-xcframework" )
83+ await exec . exec ( 'git' , [ 'clone' , 'https://github.com/WhoopInc/swift-create-xcframework.git' ] )
84+ await exec . exec ( 'cd' , 'swift-create-xcframework' )
85+ await exec . exec ( 'git' , [ 'checkout' , 'bsneed/xcode15_fix' ] )
86+ await exec . exec ( 'make' , 'install' )
87+ await exec . exec ( 'cd' , '..' )
8888 }
8989}
9090
91- async function installUsingMintIfRequired ( command , package ) {
92- if ( await isInstalled ( command ) ) {
93- core . info ( command + " is already installed" )
94-
95- } else {
96- core . info ( "Installing " + package )
97- await exec . exec ( 'mint' , [ 'install' , 'unsignedapps/swift-create-xcframework@' + scxVersion ] )
98- }
99- }
10091
10192async function isInstalled ( command ) {
10293 return await exec . exec ( 'which' , [ command ] , { silent : true , failOnStdErr : false , ignoreReturnCode : true } ) == 0
10394}
10495
105- async function runUsingMint ( command , options ) {
106- await exec . exec ( 'mint ' , [ 'run' , command , ...options ] )
96+ async function runCommand ( command , options ) {
97+ await exec . exec ( 'swift-create-xcframework ' , [ ...options ] )
10798}
10899
109100run ( )
0 commit comments