Closed petershaw closed 3 years ago
I'll quick fixed it by naming the target Git
https://github.com/petershaw/git-macOS/commit/1f6cf3c57ab485aa0952713603b2647466b927e0#diff-f913940c58e8744a2af1c68b909bb6383e49007e6c5a12fb03104a9006ae677e
@petershaw Hey! Thanks for reaching out.
I have updated a target name in the package file according to your feedback. And also added an example how to use this as a package dependency like this:
let package = Package(
name: "MyPackage",
products: [
.library(name: "myProduct", targets: ["myTarget"]),
],
dependencies: [
.package(name: "Git",
url: "https://github.com/way-to-code/git-macOS.git",
.upToNextMajor(from: "1.0.0")),
],
targets: [
.target(name: "myTarget", dependencies: [
.product(name: "Git", package: "Git")
]),
]
)
Hope this will help.
I add the repo to the dependencies:
.package(url: "https://github.com/way-to-code/git-macOS.git", .branch("master"))
but how to set the .target.dependencies?I tried:
without any luck.
can you provide an example?