ShGit

1.1.1

Git wrapper for Swift, built with https://github.com/FullQueueDeveloper/Sh
DanielSincere/ShGit

What's New

1.1.1

2023-08-19T18:30:30Z

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"]
        ),
    ]
)

Description

  • Swift Tools 5.8.0
View More Packages from this Author

Dependencies

Last updated: Mon Apr 29 2024 17:56:30 GMT-0900 (Hawaii-Aleutian Daylight Time)