diff options
author | Arun Isaac | 2023-01-23 19:18:08 +0000 |
---|---|---|
committer | Arun Isaac | 2023-01-23 19:50:38 +0000 |
commit | 9e5dffc1f87d5e038f840bdc43e81b74f511bdaf (patch) | |
tree | 3eed11259277a4699486480c6375d50ddd32951a /bin | |
parent | a7b103c726dcb0d994fa45de18fe029d539208fd (diff) | |
download | tissue-9e5dffc1f87d5e038f840bdc43e81b74f511bdaf.tar.gz tissue-9e5dffc1f87d5e038f840bdc43e81b74f511bdaf.tar.lz tissue-9e5dffc1f87d5e038f840bdc43e81b74f511bdaf.zip |
web: Change to temporary clone before building website.
* tissue/web/static.scm (build-website): Expect to be at the top level
of the repository to be exported.
* bin/tissue (pull): Create a temporary clone of the repository and
change to it before calling build-website.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tissue | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -3,7 +3,7 @@ exec guile --no-auto-compile -s "$0" "$@" !# ;;; tissue --- Text based issue tracker -;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net> +;;; Copyright © 2022, 2023 Arun Isaac <arunisaac@systemreboot.net> ;;; ;;; This file is part of tissue. ;;; @@ -415,12 +415,16 @@ HOSTNAME." (raise c))) (call-with-temporary-directory (lambda (temporary-output-directory) - (build-website (git-top-level) - temporary-output-directory - (tissue-configuration-web-files config)) - (delete-file-recursively website-directory) - (rename-file temporary-output-directory - website-directory) + (call-with-temporary-directory + (lambda (temporary-repository-clone) + (clone (git-top-level) temporary-repository-clone) + (call-with-current-directory temporary-repository-clone + (cut build-website + temporary-output-directory + (tissue-configuration-web-files config))) + (delete-file-recursively website-directory) + (rename-file temporary-output-directory + website-directory))) (chmod website-directory #o755)))) (format (current-error-port) "Built website.~%"))))))))))) |