From d0b21927ebae965ba8bcdd327b3521a5941e769c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Sat, 13 Jun 2020 20:28:18 +0200 Subject: [PATCH] Explain the complex sed command extracting SHORTNAME (#327) --- resources.whatwg.org/build/deploy.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources.whatwg.org/build/deploy.sh b/resources.whatwg.org/build/deploy.sh index abfcfff65..8d7e75190 100644 --- a/resources.whatwg.org/build/deploy.sh +++ b/resources.whatwg.org/build/deploy.sh @@ -6,6 +6,8 @@ set -o nounset # https://github.com/whatwg/whatwg.org/tree/master/resources.whatwg.org/build. # See README.md for documentation. +# This extracts the repository name from the remote URL, as the component after the final slash, +# stripping any trailing .git, to be robust against various remote URLs locally and in CI. SHORTNAME=$(git config --local remote.origin.url | sed -n 's#.*/\([^.]*\)\(\.git\)\?#\1#p') INPUT_FILE=$(find . -maxdepth 1 -name "*.bs" -print -quit)