Skip to content

Commit

Permalink
Package update (#2)
Browse files Browse the repository at this point in the history
* Update dependencies and fix some build errors

* Removed APNS configuration

* Made delegate async

* Revert to EventLoopFuture delegate

* Made generatePassContent public

* Fix hashing

* Fix passkey name

* Update README.md

* APNS configuration

* Fixed private key configuration

* Update README.md

* Reintroduced Registration clean up in case of error

* Update README.md

* Update schemas and swiftSettings

* Updated testing

* Removed StrictConcurrency

* Added CODEOWNERS
  • Loading branch information
fpseverino authored Mar 2, 2024
1 parent 3b850f6 commit 99fa653
Show file tree
Hide file tree
Showing 15 changed files with 422 additions and 585 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @fpseverino
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
push: { branches: [ main ] }

jobs:
unit-tests:
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/Packages
/*.xcodeproj
xcuserdata/
Package.resolved
187 changes: 0 additions & 187 deletions Package.resolved

This file was deleted.

47 changes: 33 additions & 14 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,32 +1,51 @@
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:5.9

import PackageDescription

let package = Package(
name: "PassKit",
platforms: [
.macOS(.v10_15), .iOS(.v13)
.macOS(.v13), .iOS(.v16)
],
products: [
.library(
name: "PassKit",
targets: ["PassKit"]),
.library(name: "PassKit", targets: ["PassKit"]),
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", from: "4.0.0-beta"),
.package(url: "https://github.com/vapor/fluent.git", from: "4.0.0-beta"),
.package(url: "https://github.com/vapor/apns.git", from: "1.0.0-beta"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0")
.package(url: "https://github.com/vapor/vapor.git", from: "4.92.4"),
.package(url: "https://github.com/vapor/fluent.git", from: "4.9.0"),
.package(url: "https://github.com/vapor/apns.git", from: "4.0.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.4")
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "PassKit",
dependencies: ["Fluent", "Vapor", "APNS", "Logging"]),
dependencies: [
.product(name: "Fluent", package: "fluent"),
.product(name: "Vapor", package: "vapor"),
.product(name: "VaporAPNS", package: "apns"),
.product(name: "Logging", package: "swift-log")
],
swiftSettings: swiftSettings
),
.testTarget(
name: "PassKitTests",
dependencies: ["PassKit"]),
dependencies: [
.target(name: "PassKit"),
.product(name: "Fluent", package: "fluent"),
.product(name: "Vapor", package: "vapor"),
.product(name: "VaporAPNS", package: "apns"),
.product(name: "Logging", package: "swift-log")
],
swiftSettings: swiftSettings
),
]
)

var swiftSettings: [SwiftSetting] { [
.enableUpcomingFeature("ExistentialAny"),
.enableUpcomingFeature("ConciseMagicFile"),
.enableUpcomingFeature("ForwardTrailingClosures"),
.enableUpcomingFeature("DisableOutwardActorInference"),
// .enableUpcomingFeature("StrictConcurrency"),
// .enableExperimentalFeature("StrictConcurrency=complete"),
] }
Loading

0 comments on commit 99fa653

Please sign in to comment.