From 4c49464afe932c065f148ece128d66a967198766 Mon Sep 17 00:00:00 2001 From: Yury Korolev Date: Thu, 14 Jan 2021 21:00:43 +0300 Subject: [PATCH] Example of FMake usage --- .DS_Store | Bin 14340 -> 12292 bytes .gitignore | 2 + ios_system.xcodeproj/project.pbxproj | 64 ++++++++------- .../xcshareddata/swiftpm/Package.resolved | 16 ---- xcfs/Package.resolved | 16 ++++ xcfs/Package.swift | 42 ++++++++++ xcfs/Sources/build/main.swift | 75 ++++++++++++++++++ 7 files changed, 169 insertions(+), 46 deletions(-) delete mode 100644 ios_system.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved create mode 100644 xcfs/Package.resolved create mode 100644 xcfs/Package.swift create mode 100644 xcfs/Sources/build/main.swift diff --git a/.DS_Store b/.DS_Store index 18473358dd5332ab78c24b147f810a2f308a1f50..e4e36cef59a5a7c615157060a437f9198aff4218 100644 GIT binary patch delta 277 zcmZoEXi1P^U|?W$DortDV2}VZIe-{M3ve?quy9S3F&32v@|b}F3=A0z@eJ7vsSK42 z=^HODW}a+d!otc3lx5lcMr1$J=AFtyjFaP4m3e?dAYmZj;NEyqoMp2*&l6@w_Q`KV zBsL!w?`LCYVW?n8W=PxYDCf&4$qG>_0kn|86=pF5g96XSi|?5y^PA}EfE0iXY=F>U zvw;K?kP8MtHptl^H3pM&OeStt5ENt%)xOmr2$Ehi9)(||-yzz=L`@{#F02*&ILI3~& delta 1735 zcmdT^TTC2P82-Q63o|=A-2)WZa_erFYYSz$1!!msOQi~JX;|7~tl+LY$m+7YunS6Q zLu0BhRmo-&V>Di3`=Sj#xVANo4{BeG_CYPC(UfS6Ni`!x(R`7Ob)D%gTG{XtNamgzLe0B%DZky`QZz zBiUqG+0fU&Z~uXTQO2ed>Yy44B*Qc6ouvYERbcbK5x6oHWinYmMMyM)Z&~Uo(_g5r^Crv<`G3B&b>vEkB0bi`(vT-SXd3Q z^P*&Us4Q%kr^3X%!Xow}G%+!`vSw0jA1l0%& zWrsR;$jXtS8FeZVjzw9<JHBAS=W7$0jD!Xflx<^Ytjoh>p82kVp>1)hN&DJsq5H zWG~O@Zr#@%3h5bny2jqtey|kH|78oFF8!+ThhGkn%J{|c(P0{)IH&zIJxwpt8+4v7 z&_%jTSLhlo(+#>wKhrPtE3H6)h&&X-gGyAP8eZ(gZgim=eK?FG7)AhN7)KZnB7sM6 z40D)2j>m8sPvR*o;2FGxmvIJXv4{(}h&S;LKE%hkiX|-L2EN8O_z}MeW+7K7&Lk>i zuNxiA*sHyumw~@aCZ3hdnN`WutkcZiJMZf2_x*!r3b|%Jb!3E6Smbn9ZS%J7*xjRj zzHva*1*4S9F70}`Q#(+wVcr<|B zvt-ORxkKXOVCKx+PI;HeCBUp1Z@KJ~Bt{vdM(LGA2Ax>r5IkKq+KR<-8-o9Z-uLM$ zeM#TZPqad}V1*1P+^9tZIt)sCum`;uz(EYck3$&2C?_|F5GD{s9Fv^j<2ZqN)Stwo zoZu%6f>U@F&*6Ezz=?hZuj1SvL|?*XT)`*WqScLW)AI!_$QH8MO%`K2 1 && args[1] != "all" { + schemes = args[1].components(separatedBy: ",") +} else { + schemes = allSchemes +} + +var checksums: [(file: String, value: String)] = [] + +for scheme in schemes { + try xcxcf( + dirPath: ".build", + project: "ios_system", + scheme: scheme, + platforms: platforms.map { ($0, excludedArchs: $0.excludedArchs) }, + enableBitCode: false + ) + + try cd(".build") { + let zip = "\(scheme).xcframework.zip" + try sh("zip -r \(zip) \(scheme).xcframework") + let chksum = try sha(path: zip) + checksums.append((file: zip, value: chksum)) + } +} + +var releaseNotes = +""" +Release notes: + + | File | SHA 256 | + | ------------------------------- |:---------------------------------------------------:| +\(checksums.map { + " | \($0.file) | \($0.value) |" +}.joined(separator: "\n")) + +""" + +try write(content: releaseNotes, atPath: ".build/release.md") +