Skip to content

A simple reference implementation of a Swift Package Registry

License

Notifications You must be signed in to change notification settings

jnewc/swift-registrar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swift-registrar

An implementation of the Swift Package Registry Service specification.

Usage

Running the server

cd server
yarn
yarn start

Using packages

To use a package add it to the depdencies of your Package.swift

    dependencies: [
        .package(id: "my_scope.my_package_name", from: "1.2.3")
    ]

And then reference it in your target dependencies using the unscoped package name.

See the official usage guide for more information.

Config

The registry folder contains the files and folders that describe the packages provided by the registry.

The stucture for a release of a package is, per the specification, represented as

registry/{scope}/{package}/{version}/release.json

each package has a list of releases at

registry/{scope}/{package}/releases.json

Package Resolution

Currently it is only possible to resolve packages from GitHub.

The package scope is used as the account identifier, and the package name is used as the repo name.

The package version corresponds to the expected tag.

Status

All GET endpoints except for /identifers is implemented.

It is not currently possible to create releases using the PUT endpoint

Troubleshooting

If you run into issues with your registry while building a package, you may need to delete the contents of the following cache folder

 ~/Library/Caches/org.swift.swiftpm

To ensure clean and predictable builds and rebuilds, you should also delete the .build and .swiftpm folders in your package repo.

About

A simple reference implementation of a Swift Package Registry

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published