2022-08-01 22:43:40 +03:00
|
|
|
|
![tea](https://tea.xyz/banner.png)
|
|
|
|
|
|
2023-03-09 19:49:03 +03:00
|
|
|
|
# What is a Pantry?
|
2022-10-17 20:45:32 +03:00
|
|
|
|
|
2023-03-09 19:49:03 +03:00
|
|
|
|
Pantries provide consistent metadata about open source packages. This
|
|
|
|
|
metadata shouldn’t require manual collection, but at this current state in
|
|
|
|
|
open source it does.
|
2023-02-11 14:06:35 +03:00
|
|
|
|
|
2023-03-09 19:49:03 +03:00
|
|
|
|
It is collected and duplicated thousands of times. A huge waste of effort.
|
|
|
|
|
|
|
|
|
|
tea aims to eradicate this wasted effort, though unfortunately, the journey
|
|
|
|
|
there will require—to some extent—doing that duplication one more time.
|
|
|
|
|
|
|
|
|
|
## Doing it a Little Better This Time
|
|
|
|
|
|
|
|
|
|
Our format is YAML, which is at least non-proprietary and could be used by
|
|
|
|
|
other tools without an independent parser. And we’re pulling in data from
|
|
|
|
|
other sources as much as possible, eg. versions are taken from the
|
|
|
|
|
“source” whenever possible.
|
2023-02-11 14:06:35 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-11-01 15:31:22 +03:00
|
|
|
|
|
2022-11-07 18:42:47 +03:00
|
|
|
|
# Contributing
|
2022-10-31 21:00:24 +03:00
|
|
|
|
|
2023-03-09 19:49:03 +03:00
|
|
|
|
Assuming you have tea (/w magic) installed:
|
2023-02-15 14:16:02 +03:00
|
|
|
|
|
2023-02-11 14:06:35 +03:00
|
|
|
|
```sh
|
2023-03-14 23:41:37 +03:00
|
|
|
|
$ git clone https://github.com/teaxyz/pantry
|
2023-02-11 14:06:35 +03:00
|
|
|
|
|
2023-03-14 23:41:37 +03:00
|
|
|
|
$ cd pantry
|
2023-02-11 14:06:35 +03:00
|
|
|
|
# all the following commands operate in `./tea.out`
|
|
|
|
|
# your tea installation remains untouched
|
|
|
|
|
|
2023-02-12 19:57:17 +03:00
|
|
|
|
$ pkg init
|
2023-02-11 14:06:35 +03:00
|
|
|
|
# ^^ creates a “wip” package.yml
|
2023-02-12 19:57:17 +03:00
|
|
|
|
# ^^ if you already know the name, you can pass it as an argument
|
2023-02-11 14:06:35 +03:00
|
|
|
|
|
2023-02-12 19:57:17 +03:00
|
|
|
|
$ pkg edit
|
2023-02-11 14:06:35 +03:00
|
|
|
|
# ^^ opens the new package.yml in your EDITOR
|
|
|
|
|
|
2023-02-12 19:57:17 +03:00
|
|
|
|
$ pkg build
|
2023-02-15 14:16:02 +03:00
|
|
|
|
# ^^ needs a zero permissions GITHUB_TOKEN to use the GitHub API
|
|
|
|
|
# either set `GITHUB_TOKEN` or run `gh auth login`
|
2023-02-11 14:06:35 +03:00
|
|
|
|
|
2023-04-01 02:12:23 +03:00
|
|
|
|
$ foo
|
|
|
|
|
# ^^ anything in the `provides:` key will now run
|
|
|
|
|
|
2023-02-12 19:57:17 +03:00
|
|
|
|
$ pkg test
|
2023-02-11 14:06:35 +03:00
|
|
|
|
# ^^ you need to write a test that verifies the package works
|
|
|
|
|
|
|
|
|
|
$ gh repo fork
|
|
|
|
|
$ git branch -m my-new-package
|
|
|
|
|
$ git push origin my-new-package
|
|
|
|
|
$ gh pr create
|
|
|
|
|
```
|
|
|
|
|
|
2023-03-09 19:49:03 +03:00
|
|
|
|
> * `pkg` can be run without magic via `tea -E pkg` (this dev-env provides `+tea.xyz/brewkit`).
|
|
|
|
|
> * `gh` can be run without magic via `tea gh`.
|
|
|
|
|
> * `git` can be run without magic via `tea git`.
|
|
|
|
|
> * `pkg build` and `pkg test` take a `-L` flag to run in a Linux Docker container
|
|
|
|
|
> * All commands take an optional pkg-spec eg. `pkg build zlib.net^1.1`
|
2023-02-15 14:16:02 +03:00
|
|
|
|
|
2023-03-09 19:49:03 +03:00
|
|
|
|
While inside a pantry dev-env you can run commands from any built packages
|
2023-03-01 13:33:57 +03:00
|
|
|
|
provided you specified their `provides:` key.
|
|
|
|
|
|
2023-02-11 14:06:35 +03:00
|
|
|
|
## Packaging Guide
|
|
|
|
|
|
|
|
|
|
Packaging can be cumbersome.
|
|
|
|
|
Our [wiki] is our packaging knowledge base.
|
|
|
|
|
For other assistance, start a [discussion].
|
|
|
|
|
|
|
|
|
|
## After Your Contribution
|
|
|
|
|
|
|
|
|
|
We build “bottles” (tar’d binaries) and upload them to both our centralized
|
|
|
|
|
bottle storage and decentralized [IPFS].
|
|
|
|
|
|
|
|
|
|
tea automatically builds new releases of packages *as soon as they are
|
|
|
|
|
released* (usually starting the builds within seconds). There is no need to
|
|
|
|
|
submit PRs for updates.
|
|
|
|
|
|
2023-02-26 17:35:02 +03:00
|
|
|
|
## Working on Other People’s Pull Requests
|
|
|
|
|
|
|
|
|
|
Packaging can be fiddly so we all pitch in. If you want to help someone else
|
|
|
|
|
with their pull request then you can use GitHub’s CLI:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ gh pr checkout 123
|
|
|
|
|
|
2023-02-26 21:54:21 +03:00
|
|
|
|
# or you can copy paste the URL:
|
2023-03-14 23:41:37 +03:00
|
|
|
|
$ gh pr checkout https://github.com/teaxyz/pantry/pull/123
|
2023-02-26 21:54:21 +03:00
|
|
|
|
|
|
|
|
|
# then open for editing:
|
|
|
|
|
$ pkg edit
|
2023-02-26 17:35:02 +03:00
|
|
|
|
```
|
|
|
|
|
|
2023-02-11 14:06:35 +03:00
|
|
|
|
|
2023-03-14 23:41:37 +03:00
|
|
|
|
[wiki]: https://github.com/teaxyz/pantry/wiki
|
2023-02-11 14:06:35 +03:00
|
|
|
|
[discussion]: https://github.com/orgs/teaxyz/discussions
|
|
|
|
|
[IPFS]: https://ipfs.tech
|