Compare commits
88 commits
vision
...
ai/forgejo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ea8038700 | ||
|
|
916218efd5 | ||
|
|
0b6882e9a3 | ||
|
|
20fe7c6b59 | ||
|
|
fd80ee6f10 | ||
|
|
ac5dacb8f1 | ||
|
|
89e0d8ec23 | ||
|
|
6afa7424fd | ||
|
|
e475cc64d9 | ||
|
|
4f71d0b979 | ||
|
|
41ee0b4d86 | ||
|
|
f8a4de3e3d | ||
|
|
d72bb9e9e4 | ||
|
|
9b9fb0af76 | ||
|
|
2334e37813 | ||
|
|
a60b90c91a | ||
|
|
851c9bf29e | ||
|
|
2231987d85 | ||
|
|
d6c8e23b6f | ||
|
|
eb8e80d3dd | ||
|
|
8cf9fd3d1a | ||
|
|
40cf264baa | ||
|
|
44ae2505f5 | ||
|
|
2ef806c38f | ||
|
|
aa5713389a | ||
|
|
992959f046 | ||
|
|
13a67f0c53 | ||
|
|
3ead36c2c7 | ||
|
|
1af38be000 | ||
|
|
9c86f58fd1 | ||
|
|
fd9be5cc06 | ||
|
|
ba301d2c37 | ||
|
|
f1a8fadf14 | ||
|
|
47ef02b780 | ||
|
|
6a2a3feb25 | ||
|
|
2a8cdc9b1b | ||
|
|
de1d86e8b7 | ||
|
|
0e862e6ff1 | ||
|
|
1f324fe7bd | ||
|
|
abbe338789 | ||
|
|
018d204bf2 | ||
|
|
13a39179b3 | ||
|
|
d79a663cf0 | ||
|
|
3e7ccfb8ab | ||
|
|
1a85654262 | ||
|
|
596259033e | ||
|
|
a032c7cfbe | ||
|
|
2249d05bb1 | ||
|
|
074b215a14 | ||
|
|
145cf37b8e | ||
|
|
414c01a66d | ||
|
|
eb9a900023 | ||
|
|
c01d70b994 | ||
|
|
3fdb4ac03e | ||
|
|
6231860a06 | ||
|
|
3fae15b62e | ||
|
|
2cded5ffb2 | ||
|
|
7536a69ec7 | ||
|
|
78e03547be | ||
|
|
5c8b9c5b05 | ||
|
|
47b8c9a480 | ||
|
|
3fe94bbbe4 | ||
|
|
43fd229a6c | ||
|
|
10bb4f254a | ||
|
|
bc99a4197e | ||
|
|
ef3cfccd70 | ||
|
|
cae2886228 | ||
|
|
f880c909a8 | ||
|
|
fa7be66023 | ||
|
|
2827600e5d | ||
|
|
319dd95fba | ||
|
|
cc2434d9cb | ||
|
|
272e5dcd26 | ||
|
|
09efee937d | ||
|
|
8f7e7c53fe | ||
|
|
8a46dff3a8 | ||
|
|
ffc6cf0c3f | ||
|
|
a76f23d65a | ||
|
|
616308270a | ||
|
|
4de67a38a7 | ||
|
|
b8135b712f | ||
|
|
bab28ba705 | ||
|
|
e129bbd6fb | ||
|
|
aba31a662d | ||
|
|
0f5be86433 | ||
|
|
e4163c0867 | ||
|
|
b0daa517a4 | ||
|
|
f304c9dd18 |
11 changed files with 197 additions and 108 deletions
59
.github/workflows/build-and-release.yaml
vendored
Normal file
59
.github/workflows/build-and-release.yaml
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
name: Build and Release
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
release-version:
|
||||
required: true
|
||||
type: string
|
||||
draft-flag:
|
||||
type: string
|
||||
default: " "
|
||||
secrets:
|
||||
XCFRAMEWORK_SIGNING_TOKEN:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-15
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- name: Validate release version
|
||||
run: |
|
||||
version="${{ inputs.release-version }}"
|
||||
major="${version%%.*}"
|
||||
if [[ ! "$major" =~ ^[0-9]+$ ]] || (( major < 6 || major > 8 )); then
|
||||
echo "::error::Capacitor $version is not supported by this repository. Starting with Capacitor 9 (see https://github.com/ionic-team/capacitor/pull/8588 PR), the iOS platform is a source-first Swift package built directly from the ionic-team/capacitor repository, so SPM distribution no longer happens here. This repository only releases major versions 6, 7, and 8."
|
||||
exit 1
|
||||
fi
|
||||
- run: |
|
||||
if [[ "${{ inputs.release-version }}" =~ ^[67]\. ]]; then
|
||||
sudo xcode-select --switch /Applications/Xcode_16.2.app
|
||||
else
|
||||
sudo xcode-select --switch /Applications/Xcode_26.0.app
|
||||
fi
|
||||
- uses: actions/checkout@v7
|
||||
- name: Install dependencies
|
||||
run: brew install ghr
|
||||
- name: Check Simulators
|
||||
run: xcrun simctl list > /dev/null
|
||||
- name: Install Simulators
|
||||
run: xcodebuild -downloadPlatform iOS
|
||||
- name: Build Capacitor and Cordova
|
||||
run: ./build-cap ${{ inputs.release-version }}
|
||||
- name: Sign Capacitor xcframework
|
||||
uses: ionic-team/sign-xcframework@main
|
||||
with:
|
||||
cert-token: ${{ secrets.XCFRAMEWORK_SIGNING_TOKEN }}
|
||||
xcframework-path: Capacitor.xcframework
|
||||
- name: Sign Cordova xcframework
|
||||
uses: ionic-team/sign-xcframework@main
|
||||
with:
|
||||
cert-token: ${{ secrets.XCFRAMEWORK_SIGNING_TOKEN }}
|
||||
xcframework-path: Cordova.xcframework
|
||||
- name: Package Capacitor and Cordova
|
||||
run: ./package-cap ${{ inputs.release-version }}
|
||||
- name: Push manifest update
|
||||
uses: EndBug/add-and-commit@v9
|
||||
- name: Create Release
|
||||
run: ghr -token ${{ secrets.GITHUB_TOKEN }} -name ${{ inputs.release-version }} ${{ inputs.draft-flag }} -replace ${{ inputs.release-version }} frameworks
|
||||
21
.github/workflows/dispatch-release.yaml
vendored
Normal file
21
.github/workflows/dispatch-release.yaml
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
name: Dispatch Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
release-version:
|
||||
description: The version to release
|
||||
required: true
|
||||
type: string
|
||||
draft-flag:
|
||||
description: "Create a Draft Release or Immediately Release"
|
||||
type: string
|
||||
default: " "
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
uses: ./.github/workflows/build-and-release.yaml
|
||||
with:
|
||||
release-version: ${{ inputs.release-version }}
|
||||
draft-flag: ${{ inputs.draft-flag }}
|
||||
secrets: inherit
|
||||
30
.github/workflows/pre-release.yml
vendored
30
.github/workflows/pre-release.yml
vendored
|
|
@ -6,21 +6,17 @@ on:
|
|||
- "release/**"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-14
|
||||
timeout-minutes: 30
|
||||
release-version:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release-version: ${{ steps.step1.outputs.release_version }}
|
||||
steps:
|
||||
- run: sudo xcode-select --switch /Applications/Xcode_15.1.app
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install build dependencies
|
||||
run: |
|
||||
gem install cocoapods xcpretty
|
||||
brew install ghr
|
||||
- name: Assign version to RELEASE_VERSION environment variable
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/*/}" >> $GITHUB_ENV
|
||||
- name: Build Capacitor and Cordova
|
||||
run: ./build-cap $RELEASE_VERSION
|
||||
- name: Push manifest update
|
||||
uses: EndBug/add-and-commit@v9
|
||||
- name: Create Draft Release
|
||||
run: ghr -token ${{ secrets.GITHUB_TOKEN }} -name ${{ env.RELEASE_VERSION }} -draft -replace ${{ env.RELEASE_VERSION }} frameworks
|
||||
- id: step1
|
||||
run: echo "release_version=${GITHUB_REF#refs/*/*/}" >> $GITHUB_OUTPUT
|
||||
create-pre-release:
|
||||
needs: release-version
|
||||
uses: ./.github/workflows/build-and-release.yaml
|
||||
with:
|
||||
release-version: ${{ needs.release-version.outputs.release-version }}
|
||||
draft-flag: -draft
|
||||
secrets: inherit
|
||||
|
|
|
|||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,5 +1,6 @@
|
|||
capacitor-checkout
|
||||
*.xcframework
|
||||
*.zip
|
||||
.swiftpm
|
||||
frameworks
|
||||
|
||||
.build
|
||||
|
|
|
|||
4
MEENOW-FORGEJO.md
Normal file
4
MEENOW-FORGEJO.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Capacitor/Cordova 8.5.2, unchanged binary artifacts and upstream checksums.
|
||||
Imported once from Ionic; future builds use only git.kico-dev.de.
|
||||
Original upstream revision: 0b6882e9a3288342aacf36348e5a94e4f1dd7b13.
|
||||
Licence and notices are retained from upstream. MeeNow pins this commit.
|
||||
|
|
@ -18,13 +18,13 @@ let package = Package(
|
|||
targets: [
|
||||
.binaryTarget(
|
||||
name: "Capacitor",
|
||||
url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/6.0.0-rc.0/Capacitor.xcframework.zip",
|
||||
checksum: "40931648c794e29ade96907e7e25747cac89ad6dc0841263be35c69108732a06"
|
||||
url: "https://git.kico-dev.de/martin/capacitor-swift-pm/raw/commit/916218efd53e6e646c36bbfd71e8f06c1b643fbf/artifacts/Capacitor.xcframework.zip",
|
||||
checksum: "134c65a8bd30bfaa8ccb158d78142fa7231bf3f472e4a5d808c5fbed90fd4c75"
|
||||
),
|
||||
.binaryTarget(
|
||||
name: "Cordova",
|
||||
url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/6.0.0-rc.0/Cordova.xcframework.zip",
|
||||
checksum: "0f3eed00c80e54a50eb10c0c2c65c7f09ed0a3d4bddd2b95537f32cc3d41186f"
|
||||
url: "https://git.kico-dev.de/martin/capacitor-swift-pm/raw/commit/916218efd53e6e646c36bbfd71e8f06c1b643fbf/artifacts/Cordova.xcframework.zip",
|
||||
checksum: "57ff2c8f1e5dcd8d4379ac3cccde1407d81ccd575347dc2aff4f72272b8794a1"
|
||||
)
|
||||
]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
# Experimental Swift Package Manager Support for Capacitor
|
||||
# Swift Package Manager Support for Capacitor
|
||||
|
||||
This repo is for hosting binary xcframework releases of Capacitor and CapacitorCordova for experimental SPM support.
|
||||
This repo is for hosting binary xcframework releases of Capacitor and CapacitorCordova for SPM support.
|
||||
|
||||
Only applies to Capacitor major versions 6, 7, and 8. Starting with Capacitor 9, the iOS platform is a source-first Swift package built directly from the [ionic-team/capacitor](https://github.com/ionic-team/capacitor) repository.
|
||||
|
|
|
|||
BIN
artifacts/Capacitor.xcframework.zip
Normal file
BIN
artifacts/Capacitor.xcframework.zip
Normal file
Binary file not shown.
BIN
artifacts/Cordova.xcframework.zip
Normal file
BIN
artifacts/Cordova.xcframework.zip
Normal file
Binary file not shown.
99
build-cap
99
build-cap
|
|
@ -1,22 +1,25 @@
|
|||
#!/bin/bash -eoux pipefail
|
||||
#!/usr/bin/env bash -eoux pipefail
|
||||
|
||||
build_capacitor_simulator() {
|
||||
build_simulator() {
|
||||
local SCHEME=$1
|
||||
xcodebuild archive \
|
||||
-scheme Capacitor \
|
||||
-scheme $SCHEME \
|
||||
-workspace Capacitor.xcworkspace \
|
||||
-destination "generic/platform=iOS Simulator" \
|
||||
-archivePath ./Build/iOS-Simulator \
|
||||
-configuration Release \
|
||||
-configuration Debug \
|
||||
-archivePath ./Build/$SCHEME-iOS-Simulator \
|
||||
SKIP_INSTALL=NO \
|
||||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
|
||||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
|
||||
DEBUG_INFORMATION_FORMAT="dwarf-with-dsym"
|
||||
}
|
||||
|
||||
build_capacitor_ios() {
|
||||
build_ios() {
|
||||
local SCHEME=$1
|
||||
xcodebuild archive \
|
||||
-scheme Capacitor \
|
||||
-scheme $SCHEME \
|
||||
-workspace Capacitor.xcworkspace \
|
||||
-destination "generic/platform=iOS" \
|
||||
-archivePath ./Build/iOS \
|
||||
-archivePath ./Build/$SCHEME-iOS \
|
||||
SKIP_INSTALL=NO \
|
||||
SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO \
|
||||
DEBUG_INFORMATION_FORMAT="dwarf-with-dsym" \
|
||||
|
|
@ -24,63 +27,28 @@ build_capacitor_ios() {
|
|||
}
|
||||
|
||||
create_xcframeworks() {
|
||||
build_capacitor_simulator
|
||||
build_capacitor_ios
|
||||
build_simulator Capacitor
|
||||
build_simulator Cordova
|
||||
|
||||
rm -rf ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
|
||||
rm -rf ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
|
||||
build_ios Capacitor
|
||||
build_ios Cordova
|
||||
|
||||
rm -rf ./Build/Capacitor-iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
|
||||
rm -rf ./Build/Capacitor-iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
|
||||
|
||||
xcodebuild -create-xcframework \
|
||||
-framework ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework \
|
||||
-debug-symbols $PWD/Build/iOS-Simulator.xcarchive/dSYMs/Capacitor.framework.dSYM \
|
||||
-framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework \
|
||||
-debug-symbols $PWD/Build/iOS.xcarchive/dSYMs/Capacitor.framework.dSYM \
|
||||
-framework ./Build/Capacitor-iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework \
|
||||
-debug-symbols $PWD/Build/Capacitor-iOS-Simulator.xcarchive/dSYMs/Capacitor.framework.dSYM \
|
||||
-framework ./Build/Capacitor-iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework \
|
||||
-debug-symbols $PWD/Build/Capacitor-iOS.xcarchive/dSYMs/Capacitor.framework.dSYM \
|
||||
-output Capacitor.xcframework
|
||||
|
||||
xcodebuild -create-xcframework \
|
||||
-framework ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Cordova.framework \
|
||||
-debug-symbols $PWD/Build/iOS-Simulator.xcarchive/dSYMs/Cordova.framework.dSYM \
|
||||
-framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Cordova.framework \
|
||||
-debug-symbols $PWD/Build/iOS.xcarchive/dSYMs/Cordova.framework.dSYM \
|
||||
-framework ./Build/Cordova-iOS-Simulator.xcarchive/Products/Library/Frameworks/Cordova.framework \
|
||||
-debug-symbols $PWD/Build/Cordova-iOS-Simulator.xcarchive/dSYMs/Cordova.framework.dSYM \
|
||||
-framework ./Build/Cordova-iOS.xcarchive/Products/Library/Frameworks/Cordova.framework \
|
||||
-debug-symbols $PWD/Build/Cordova-iOS.xcarchive/dSYMs/Cordova.framework.dSYM \
|
||||
-output Cordova.xcframework
|
||||
|
||||
zip -r Capacitor.xcframework.zip Capacitor.xcframework
|
||||
zip -r Cordova.xcframework.zip Cordova.xcframework
|
||||
}
|
||||
|
||||
write_package_file() {
|
||||
cat << EOF > Package.swift
|
||||
// swift-tools-version:5.3
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "capacitor-swift-pm",
|
||||
products: [
|
||||
.library(
|
||||
name: "Capacitor",
|
||||
targets: ["Capacitor"]
|
||||
),
|
||||
.library(
|
||||
name: "Cordova",
|
||||
targets: ["Cordova"]
|
||||
)
|
||||
],
|
||||
dependencies: [],
|
||||
targets: [
|
||||
.binaryTarget(
|
||||
name: "Capacitor",
|
||||
url: "$1",
|
||||
checksum: "$2"
|
||||
),
|
||||
.binaryTarget(
|
||||
name: "Cordova",
|
||||
url: "$3",
|
||||
checksum: "$4"
|
||||
)
|
||||
]
|
||||
)
|
||||
EOF
|
||||
}
|
||||
|
||||
git clone https://github.com/ionic-team/capacitor capacitor-checkout
|
||||
|
|
@ -89,14 +57,5 @@ git checkout $1
|
|||
|
||||
create_xcframeworks
|
||||
|
||||
cap_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/Capacitor.xcframework.zip"
|
||||
cap_sha=$(shasum -a 256 Capacitor.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n)
|
||||
cap_cordova_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/Cordova.xcframework.zip"
|
||||
cap_cordova_sha=$(shasum -a 256 Cordova.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n)
|
||||
|
||||
cd ../../../
|
||||
mkdir frameworks
|
||||
mv capacitor-checkout/ios/Capacitor/{Capacitor,Cordova}.xcframework.zip frameworks
|
||||
|
||||
write_package_file $cap_url $cap_sha $cap_cordova_url $cap_cordova_sha
|
||||
|
||||
mv Capacitor.xcframework ../../../
|
||||
mv Cordova.xcframework ../../../
|
||||
|
|
|
|||
47
package-cap
Executable file
47
package-cap
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
#!/usr/bin/env bash -eoux pipefail
|
||||
|
||||
mkdir frameworks
|
||||
zip -r frameworks/Capacitor.xcframework.zip Capacitor.xcframework
|
||||
zip -r frameworks/Cordova.xcframework.zip Cordova.xcframework
|
||||
|
||||
write_package_file() {
|
||||
cat <<EOF >Package.swift
|
||||
// swift-tools-version:5.3
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "capacitor-swift-pm",
|
||||
products: [
|
||||
.library(
|
||||
name: "Capacitor",
|
||||
targets: ["Capacitor"]
|
||||
),
|
||||
.library(
|
||||
name: "Cordova",
|
||||
targets: ["Cordova"]
|
||||
)
|
||||
],
|
||||
dependencies: [],
|
||||
targets: [
|
||||
.binaryTarget(
|
||||
name: "Capacitor",
|
||||
url: "$1",
|
||||
checksum: "$2"
|
||||
),
|
||||
.binaryTarget(
|
||||
name: "Cordova",
|
||||
url: "$3",
|
||||
checksum: "$4"
|
||||
)
|
||||
]
|
||||
)
|
||||
EOF
|
||||
}
|
||||
|
||||
cap_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/Capacitor.xcframework.zip"
|
||||
cap_sha=$(shasum -a 256 frameworks/Capacitor.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n)
|
||||
cap_cordova_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/Cordova.xcframework.zip"
|
||||
cap_cordova_sha=$(shasum -a 256 frameworks/Cordova.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n)
|
||||
|
||||
write_package_file $cap_url $cap_sha $cap_cordova_url $cap_cordova_sha
|
||||
Loading…
Reference in a new issue