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