Skip to content

A collection of packages and tooling for generating and consuming package feeds.

License

Notifications You must be signed in to change notification settings

tuist/swift-package-collection-generator

 
 

Repository files navigation

Swift Package Collection Generator

A package collection (SE-0291) is a curated list of packages and associated metadata which makes it easier to discover an existing package for a particular use case. SwiftPM will allow users to subscribe to package collections and make their contents accessible to any clients of libSwiftPM.

This repository provides a set of Swift packages and tooling for the generation and consumption of package collections.

Swift toolchain version 5.4 or greater is required.

Branches

The main branch depends on SwiftPM's main branch and may be unstable. It is recommended to use versioned branches such as 5.5, which depend on the corresponding SwiftPM's release/<version> branch, instead.

Installation

Currently, the package collection generator is a standalone tool that's not integrated with the Swift toolchain. To use it from the command line, first build the project from source by cloning the repository and running the following from the root directory:

swift build --configuration release

Then, either run the final executables directly (e.g., .build/release/package-collection-generate) or install them on your system path:

install .build/release/package-collection-generate /usr/local/bin/package-collection-generate
install .build/release/package-collection-diff /usr/local/bin/package-collection-diff
install .build/release/package-collection-sign /usr/local/bin/package-collection-sign
install .build/release/package-collection-validate /usr/local/bin/package-collection-validate

Finally, another way to run the tool is via swift run, which builds and runs the specified executable. For example:

swift run package-collection-generate

Package Collection Format

Package collections can be created and published by anyone. To make sure SwiftPM can consume them, all package collections must adhere to the same format. See the v1 format for details.

Generating a Package Collection

package-collection-generate is a Swift command-line tool that helps generate package collections.

Validating a Package Collection

package-collection-validate is a Swift command-line tool that validates package collections against the defined format.

  • This should be run against the final output generated by the package-collection-generate command.

Comparing Package Collections

package-collection-diff is a Swift command-line tool that compares two package collections to determine if they are different from each other.

Contributing to Swift Package Collection Generator

Contributions to this repo are welcomed and encouraged! Please see the Contributing to Swift guide.

To be a truly great community, Swift.org needs to welcome developers from all walks of life, with different backgrounds, and with a wide range of experience. A diverse and friendly community will have more great ideas, more unique perspectives, and produce more great code. We will work diligently to make the Swift community welcoming to everyone.

To give clarity of what is expected of our members, Swift has adopted the code of conduct defined by the Contributor Covenant. This document is used across many open source communities, and we think it articulates our values well. For more, see the Code of Conduct.

About

A collection of packages and tooling for generating and consuming package feeds.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 94.7%
  • Shell 4.2%
  • Dockerfile 1.1%