Compare commits
113 commits
3.5.1
...
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 | ||
|
|
fe3c5b63e7 | ||
|
|
2ac2ed82d3 | ||
|
|
8acde9a484 | ||
|
|
d58ddfd0e7 | ||
|
|
07ef99c868 | ||
|
|
636ac32f18 | ||
|
|
ff345aed4a | ||
|
|
6e0e85303a | ||
|
|
64202ccaec | ||
|
|
8220cf9c63 | ||
|
|
df48de7324 | ||
|
|
0b4bb48cea | ||
|
|
f5e8a579ee | ||
|
|
e538cfcd75 | ||
|
|
c108ae317c | ||
|
|
b05663b1a9 | ||
|
|
9b2a334518 | ||
|
|
e5a8a6e219 | ||
|
|
640291de3a | ||
|
|
b5b34d78eb | ||
|
|
d8db401a7b | ||
|
|
327984e52e | ||
|
|
2289171f18 | ||
|
|
80b0809da8 | ||
|
|
7b729a7b92 |
12 changed files with 221 additions and 85 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
|
||||
22
.github/workflows/pre-release.yml
vendored
Normal file
22
.github/workflows/pre-release.yml
vendored
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
name: Pre-Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "release/**"
|
||||
|
||||
jobs:
|
||||
release-version:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release-version: ${{ steps.step1.outputs.release_version }}
|
||||
steps:
|
||||
- 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
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -1,4 +1,6 @@
|
|||
capacitor-checkout
|
||||
*.xcframework
|
||||
*.zip
|
||||
.swiftpm
|
||||
|
||||
frameworks
|
||||
.build
|
||||
|
|
|
|||
11
LICENSE.md
Normal file
11
LICENSE.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2022-present Drifty Co.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
Third-party components, software, and/or libraries (collectively, "components") are included under the licenses specified by their authors. For information about these third-party licenses, refer to the separate legal notices governing such components at NOTICE file at the top level of the package.
|
||||
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.
|
||||
|
|
@ -12,19 +12,19 @@ let package = Package(
|
|||
.library(
|
||||
name: "Cordova",
|
||||
targets: ["Cordova"]
|
||||
),
|
||||
)
|
||||
],
|
||||
dependencies: [],
|
||||
targets: [
|
||||
.binaryTarget(
|
||||
name: "Capacitor",
|
||||
url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/3.5.1/Capacitor.xcframework.zip",
|
||||
checksum: "cc5d74b531ca40ba6ed4deca3bd5bb20aa3727684d8965ae94b9f075a19f4a37"
|
||||
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/3.5.1/CapacitorCordova.xcframework.zip",
|
||||
checksum: "85f0a7a523f073cc55af7e02c8e4b9322e2681fe012813a32015e9304e5ee1c1"
|
||||
url: "https://git.kico-dev.de/martin/capacitor-swift-pm/raw/commit/916218efd53e6e646c36bbfd71e8f06c1b643fbf/artifacts/Cordova.xcframework.zip",
|
||||
checksum: "57ff2c8f1e5dcd8d4379ac3cccde1407d81ccd575347dc2aff4f72272b8794a1"
|
||||
)
|
||||
]
|
||||
)
|
||||
|
|
|
|||
5
README.md
Normal file
5
README.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Swift Package Manager Support for Capacitor
|
||||
|
||||
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.
101
build-cap
101
build-cap
|
|
@ -1,96 +1,61 @@
|
|||
#!/bin/bash -eoux pipefail
|
||||
#!/usr/bin/env bash -eoux pipefail
|
||||
|
||||
portals_dev_release_commit() {
|
||||
git log --oneline | grep -B 1 "Release $1" | head -n1 | sed 's/ /\n/g' | head -n1 | xargs git checkout
|
||||
}
|
||||
|
||||
|
||||
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 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" \
|
||||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
|
||||
}
|
||||
|
||||
create_xcframeworks() {
|
||||
build_capacitor_simulator
|
||||
build_capacitor_ios
|
||||
build_simulator Capacitor
|
||||
build_simulator Cordova
|
||||
|
||||
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 \
|
||||
-framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework \
|
||||
-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 \
|
||||
-framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Cordova.framework \
|
||||
-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
|
||||
cd capacitor-checkout/ios/Capacitor
|
||||
git checkout portals-dev
|
||||
#portals_dev_release_commit $1
|
||||
git checkout $1
|
||||
|
||||
create_xcframeworks
|
||||
|
||||
cap_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/Capacitor.xcframework.zip"
|
||||
cap_sha=$(sha256sum 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/CapacitorCordova.xcframework.zip"
|
||||
cap_cordova_sha=$(sha256sum Cordova.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n)
|
||||
|
||||
cd ../../../
|
||||
|
||||
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