Skip to content

Instantly share code, notes, and snippets.

@ydnar
Created March 17, 2020 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ydnar/51cd6509d816229b9eac1c4227f7b30c to your computer and use it in GitHub Desktop.
Save ydnar/51cd6509d816229b9eac1c4227f7b30c to your computer and use it in GitHub Desktop.
Swift tools package
TOOLS := swiftformat protoc-gen-swift protoc-gen-grpc-swift
tools: $(TOOLS)
$(TOOLS): Package.swift Package.resolved
swift build -c release --product $@
cp $$(swift build -c release --show-bin-path)/$@ ~/bin/
// swift-tools-version:5.1
import PackageDescription
let package = Package(
name: "Tools",
dependencies: [
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.8.0"),
.package(url: "https://github.com/grpc/grpc-swift.git", .branch("nio")),
.package(url: "https://github.com/nicklockwood/SwiftFormat.git", from: "0.44.3"),
],
targets: [.target(name: "Tools")]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment