Swiftpack.co - FullQueueDeveloper/ShGit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by FullQueueDeveloper.
FullQueueDeveloper/ShGit 1.0.0
Git wrapper for Swift, built with https://github.com/FullQueueDeveloper/Sh
⭐️ 0
🕓 4 weeks ago
macOS
.package(url: "https://github.com/FullQueueDeveloper/ShGit.git", from: "1.0.0")

ShGit

Git wrapper for Swift powered by Sh.

Example

Example usage

import ShGit

let git = Git()

// check if repo is clean
guard git.isClean() else {
  print("git repo is not clean")
  return
}

let root = try git.root() // Fetch the root of the git repo

// ...
// do something with the git root
// such as load an asset or
// run a script

Example Package.swift

// swift-tools-version:5.6

import PackageDescription

let package = Package(
    name: "Scripts",
    platforms: [.macOS(.v12)],
    dependencies: [
      .package(url: "https://github.com/FullQueueDeveloper/ShGit.git", from: "1.0.0"),
    ],
    targets: [
        .executableTarget(
            name: "MyScript",
            dependencies: ["ShGit"]
        ),
    ]
)

GitHub

link
Stars: 0
Last commit: 3 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Dependencies

Related Packages

Release Notes

1.0.0
4 weeks ago

initial commit with isClean and root

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics