Skip to content

Commit

Permalink
Build libgit2.xcframework without module map
Browse files Browse the repository at this point in the history
  • Loading branch information
light-tech committed Jul 14, 2021
1 parent 3baf387 commit d9ddb00
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
13 changes: 11 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,22 @@ jobs:
continueOnError: false
enabled: true

- script: swift package compute-checksum libgit2.xcframework.zip
displayName: 'Compute libgit2 XCFramework Checksum'
enabled: true

- publish: $(System.DefaultWorkingDirectory)/libgit2.xcframework.zip
artifact: libgit2
displayName: 'Publish libgit2 XCFramework'
enabled: true

- script: swift package compute-checksum Clibgit2.xcframework.zip
displayName: 'Compute XCFramework Checksum'
displayName: 'Compute Clibgit2 XCFramework Checksum'
enabled: true

- publish: $(System.DefaultWorkingDirectory)/Clibgit2.xcframework.zip
artifact: Clibgit2
displayName: 'Publish LibGit2 XCFramework'
displayName: 'Publish Clibgit2 XCFramework'
enabled: true

- publish: $(System.DefaultWorkingDirectory)/libpcre.xcframework
Expand Down
8 changes: 6 additions & 2 deletions build-libgit2-framework.sh
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ function build_xcframework() {
done

cd $REPO_ROOT
xcodebuild -create-xcframework ${FRAMEWORKS_ARGS[@]} -output C$FWNAME.xcframework
xcodebuild -create-xcframework ${FRAMEWORKS_ARGS[@]} -output $FWNAME.xcframework
}

### Build all frameworks for every available platforms
Expand All @@ -237,7 +237,11 @@ done
# build_xcframework $fw ${AVAILABLE_PLATFORMS[@]}
#done

# Build raw libgit2 XCFramework for Objective-C usage
build_xcframework libgit2 ${AVAILABLE_PLATFORMS[@]}
copy_modulemap
zip -r libgit2.xcframework.zip libgit2.xcframework/

# Build Clibgit2 XCFramework for use with SwiftGit2
mv libgit2.xcframework Clibgit2.xcframework
copy_modulemap
zip -r Clibgit2.xcframework.zip Clibgit2.xcframework/

0 comments on commit d9ddb00

Please # to comment.