2022-12-24 21:49:18 +09:00
|
|
|
# Development Guide
|
|
|
|
|
|
|
|
|
|
## Add support for new tool
|
|
|
|
|
|
2023-07-31 22:32:04 +09:00
|
|
|
(Example: [ffbd316](https://github.com/taiki-e/install-action/commit/ffbd316e0fe98cb460dae3a66cd2ef9deb398bb1))
|
2022-12-26 01:43:50 +09:00
|
|
|
|
2024-06-04 02:56:04 +08:00
|
|
|
1\. Add base manifest to [`tools/codegen/base`](tools/codegen/base) directory.
|
2022-12-24 21:49:18 +09:00
|
|
|
|
|
|
|
|
See JSON files in `tools/codegen/base` directory for examples of the manifest.
|
|
|
|
|
|
2024-06-04 02:56:04 +08:00
|
|
|
2\. Generate manifest with the following command (replace `<tool>` with the tool name).
|
2022-12-24 21:49:18 +09:00
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
./tools/manifest.sh <tool>
|
|
|
|
|
```
|
|
|
|
|
|
2023-06-09 18:47:37 +02:00
|
|
|
> If you're having problem with github api rate limit, you can use your GITHUB_TOKEN to increase the rate limit.
|
|
|
|
|
> If you have `Github CLI` installed (the command `gh`), you can:
|
2023-06-10 19:01:31 +09:00
|
|
|
>
|
2023-06-09 18:47:37 +02:00
|
|
|
> ```shell
|
|
|
|
|
> GITHUB_TOKEN=$(gh auth status --show-token 2>&1 | sed -n 's/^.*Token: \(.*\)$/\1/p') ./tools/manifest.sh <tool>
|
|
|
|
|
> ```
|
|
|
|
|
|
2024-06-04 02:56:04 +08:00
|
|
|
## Refresh TOOLS.md
|
|
|
|
|
|
|
|
|
|
To update `TOOLS.md`, run
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
./tools/update-markdown.sh
|
|
|
|
|
```
|
|
|
|
|
|
2023-06-25 21:07:12 -07:00
|
|
|
## Troubleshooting
|
|
|
|
|
|
2023-07-31 22:10:01 +09:00
|
|
|
If one of the CI builds fails due to a bin path or release asset_name, fix the problem in the base
|
2023-06-25 21:23:38 -07:00
|
|
|
manifest, and re-run the manifest tool `tools/manifest.sh` to regenerate the manifest json file. The
|
|
|
|
|
base manifest supports overriding the bin path per platform by adding the `"bin"` / `"asset_name"`
|
|
|
|
|
to the platform object.
|
2023-07-31 22:10:01 +09:00
|
|
|
|
|
|
|
|
If CI fails only for containers using older versions of glibc or musl, you may need to add the tool
|
|
|
|
|
name to one of the `*_incompat` arrays in `tools/ci/tool-list.sh`.
|