feat: provide way to build and attach platforms
This commit is contained in:
@@ -3,13 +3,18 @@
|
||||
# rustdoc serves the crate under <crate>/, so the target includes that segment.
|
||||
# Env: WWW_ROOT (default /srv/www), SITE_SLUG (default coursebank),
|
||||
# CRATE (default coursebank).
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
root="${WWW_ROOT:-/srv/www}/${SITE_SLUG:-coursebank}"
|
||||
crate="${CRATE:-coursebank}"
|
||||
|
||||
if [ -e "$root/release/$crate/index.html" ]; then
|
||||
target="release/$crate/"
|
||||
else
|
||||
target="nightly/$crate/"
|
||||
fi
|
||||
|
||||
printf '%s\n' "<!doctype html><meta http-equiv=\"refresh\" content=\"0; url=${target}\">" > "$root/index.html"
|
||||
echo "site root -> $target"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user