• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

swiftbrew/Swiftbrew: Homebrew for Swift packages

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

swiftbrew/Swiftbrew

开源软件地址:

https://github.com/swiftbrew/Swiftbrew

开源编程语言:

Swift 89.2%

开源软件介绍:

Swiftbrew

A package manager that installs prebuilt Swift command line tool packages, or Homebrew for Swift packages.

Installation

Homebrew

brew install swiftbrew/tap/swiftbrew

Mint

mint install swiftbrew/Swiftbrew

Swiftbrew

swift brew install swiftbrew/Swiftbrew

Usage

swift brew install <package-reference>

Package reference can be a shorthand for a GitHub repository (Carthage/Carthage) or a full git URL (https://github.com/Carthage/Carthage.git), optionally followed by a tagged version (@x.y.z). Swiftbrew currently only supports public repositories.

Examples

Install the latest version of Carthage:

swift brew install Carthage/Carthage

or

swift brew install https://github.com/Carthage/Carthage

Install Carthage version 0.33.0:

swift brew install Carthage/[email protected]

Why create another package manager?

Homebrew is a popular method of distributing command line tools on macOS. Some popular Swift command line tools are already distributed via Homebrew. But there are some limitations:

  • Distributing via Homebrew requires you to create a formula and then maintain that formula.
  • If your package is not popular enough to be accepted into Homebrew's core formulae, you would have to create and maintain your own tap.
  • As a package maintainer, a usual release process would be: build the executable, archive it into a tarball/zipball, upload it to GitHub releases, bump formula version. This is a cumbersome process.
  • It can be tricky to install a specific version of a tool with Homebrew.

Mint is a package manager that builds and installs Swift command line tool packages. Mint is more flexible than Homebrew as it allows installing a specific version of a package. The downside of Mint is that it requires you to build all packages from source. This can be very time-consuming as you start replacing most of your Ruby tools in your iOS project with Swift packages, since bumping a tool version would require rebuilding it from all your developers' machines.

Introducing Swiftbrew

Swiftbrew saves Swift packages maintainers and users' time by caching prebuilt Swift command line tool packages, while flexible enough to let users install multiple versions of a package. Swiftbrew builds and caches Swift packages on CDN servers so that they are fast to download from anywhere. Swiftbrew bottles (prebuilt packages) are hosted on Bintray, the same service that hosts Homebrew bottles. If any package is not available as a bottle, it will be built by Swiftbrew build workers and cached after the first installation request, so that it will available for everyone later on. Here is what an installation output looks like:


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
minio/homebrew-stable: Homebrew tap for MinIO发布时间:2022-06-14
下一篇:
oznu/homebridge-syno-spk: Homebridge Package for Synology DSM 7.发布时间:2022-06-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap