~zethra/stargazer

fa560854beb6a8bebdfb5cabc723baa3ef7dfd02 — Sashanoraa 9 days ago b8f8d50 main
Add vendor script

This script collects all of Stargazer's dependencies for a given release
into a tar ball so Stargazer can be built if crates.io is inaccessible.

Signed-off-by: Sashanoraa <sasha@noraa.gay>
4 files changed, 28 insertions(+), 1 deletions(-)

M .gitignore
M README.md
M scripts/clean
A scripts/vendor
M .gitignore => .gitignore +2 -0
@@ 7,3 7,5 @@ stargazer.ini.5
*.tar.xz
out
test_data/cgi-bin/loop
config.toml
/vendor

M README.md => README.md +5 -0
@@ 59,6 59,11 @@ git clone https://git.sr.ht/~zethra/stargazer && cg stargazer
./scripts/install --prefix=/usr
```

If crates.io is inaccessible, Stargazer's dependencies for each release are
also available on the release page. Simply download the vendor tar ball,
extract it in the project root, and follow the instructions in the
`INSTRUSTIONS` file.

## Minimum Supported Rust Version Policy

The required Rust version will not change between patch versions.

M scripts/clean => scripts/clean +1 -1
@@ 1,3 1,3 @@
#!/bin/sh

rm -f ./stargazer.1 ./stargazer.ini.5 ./stargazer-*.tar.xz
rm -f ./stargazer.1 ./stargazer.ini.5 ./stargazer-*.tar.xz vendor config.toml

A scripts/vendor => scripts/vendor +20 -0
@@ 0,0 1,20 @@
#!/bin/sh

cargo vendor > config.toml

TAG_NAME="$(git describe --tags $(git rev-list --tags --max-count=1))"

cat > INSTRUSTIONS << EOF
There vendored dependancies are proveded with each release of Stargazer. They
are proveded to ensure that Stargazer can be built even if crates.io is
inaccessable for some reason.

To use these vendored dependancies instead of pulling them from crates.io:

- Place the vendor directory in the root of the project
- Place config.toml in .cargo/config.toml (if the file already exists, appends the content to the existing file)
EOF

tar cvJf "./stargazer-vendor-$TAG_NAME.tar.xz" ./vendor ./config.toml INSTRUSTIONS

rm INSTRUSTIONS