From: Matt Birkholz Date: Thu, 25 Jan 2018 19:54:49 +0000 (-0700) Subject: devops (devops:release): show progress X-Git-Tag: mit-scheme-pucked-devops-0.5~8 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=299e0a21fe01cfe2f0cde6f211f5a792d4a71cbf;p=mit-scheme.git devops (devops:release): show progress --- diff --git a/src/devops/devops.scm b/src/devops/devops.scm index 9993800e1..c0d3c9731 100644 --- a/src/devops/devops.scm +++ b/src/devops/devops.scm @@ -392,36 +392,46 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (let* ((project (project-name)) (vers (version-string version)) (pkgvers (string project"-"vers)) + (out (current-output-port)) + (runl (lambda strings (runl* out strings))) (logfile (string "devops/"pkgvers"-src.log"))) (log "# "pkgvers":\n") (write-lint (core-lint version '() dirt)) (with-output-log logfile (lambda () - (run "mkdir devops/"pkgvers) + (runl "mkdir devops/"pkgvers) (if snap? - (run "git archive --prefix="project"/ HEAD" - " | ( cd devops/"pkgvers" && tar xf - )") + (runl "git archive --prefix="project"/ HEAD" + " | ( cd devops/"pkgvers" && tar xf - )") (begin - (run "git tag "git-tag-create-options" -m \"\" "pkgvers) - (run "git archive --prefix="project"/ "pkgvers - " | ( cd devops/"pkgvers" && tar xf - )"))) - (run "cd devops/"pkgvers" && "project"/dist/make-src-files standard") - (run "mv devops/"pkgvers"/"pkgvers".tar.gz devops/") - (run "rm -rf devops/"pkgvers) - (run "cd devops/ && tar xzf "pkgvers".tar.gz") - (run "cd devops/ && dpkg-source --build "pkgvers) - (run "chmod 444 devops/"project"_"vers".dsc") - (run "chmod 444 devops/"project"_"vers".tar.xz") - (run "rm -rf devops/"pkgvers))) + (runl "git tag "git-tag-create-options" -m \"\" "pkgvers) + (runl "git archive --prefix="project"/ "pkgvers + " | ( cd devops/"pkgvers" && tar xf - )"))) + (runl "cd devops/"pkgvers" && "project"/dist/make-src-files standard") + (runl "mv devops/"pkgvers"/"pkgvers".tar.gz devops/") + (runl "rm -rf devops/"pkgvers) + (runl "cd devops/ && tar xzf "pkgvers".tar.gz") + (runl "cd devops/ && dpkg-source --build "pkgvers) + (runl "chmod 444 devops/"project"_"vers".dsc") + (runl "chmod 444 devops/"project"_"vers".tar.xz") + (runl "rm -rf devops/"pkgvers))) (delete-file logfile))) +(define (runl* out strings) + (let ((cmdln (string* strings))) + (write-string cmdln out)(newline out) + (write-string cmdln)(newline) + (shell* cmdln))) + (define (release-plugin plugin version changes dirt snap?) (if (and (null? changes) (not snap?)) (error "no unreleased commits")) (let* ((vers (version-string version)) (pkg (plugin-package plugin)) (pkgvers (string pkg"-"vers)) + (out (current-output-port)) + (runl (lambda strings (runl* out strings))) (logfile (string "devops/"pkgvers"-src.log")) (dir (plugin-directory plugin))) (log "# "pkgvers":\n") @@ -430,23 +440,23 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. logfile (lambda () (if snap? - (run "git archive --prefix="pkgvers"/ HEAD -- "dir - " | ( cd devops && tar xf - )") + (runl "git archive --prefix="pkgvers"/ HEAD -- "dir + " | ( cd devops && tar xf - )") (begin - (run "git tag "git-tag-create-options" -m \"\" "pkgvers) - (run "git archive --prefix="pkgvers"/ "pkgvers" -- "dir - " | ( cd devops && tar xf - )"))) - (run "cd devops/"pkgvers"/"dir" && ./autogen.sh") - (run "cd devops/"pkgvers"/"dir" && ./configure") - (run "cd devops/"pkgvers"/"dir" && make dist") - (run "mv devops/"pkgvers"/"dir"/"pkgvers".tar.gz devops/") - (run "chmod 444 devops/"pkgvers".tar.gz") - (run "rm -rf devops/"pkgvers) - (run "cd devops/ && tar xzf "pkgvers".tar.gz") - (run "cd devops/ && dpkg-source --build "pkgvers) - (run "chmod 444 devops/"pkg"_"vers".dsc") - (run "chmod 444 devops/"pkg"_"vers".tar.xz") - (run "rm -rf devops/"pkgvers))) + (runl "git tag "git-tag-create-options" -m \"\" "pkgvers) + (runl "git archive --prefix="pkgvers"/ "pkgvers" -- "dir + " | ( cd devops && tar xf - )"))) + (runl "cd devops/"pkgvers"/"dir" && ./autogen.sh") + (runl "cd devops/"pkgvers"/"dir" && ./configure") + (runl "cd devops/"pkgvers"/"dir" && make dist") + (runl "mv devops/"pkgvers"/"dir"/"pkgvers".tar.gz devops/") + (runl "chmod 444 devops/"pkgvers".tar.gz") + (runl "rm -rf devops/"pkgvers) + (runl "cd devops/ && tar xzf "pkgvers".tar.gz") + (runl "cd devops/ && dpkg-source --build "pkgvers) + (runl "chmod 444 devops/"pkg"_"vers".dsc") + (runl "chmod 444 devops/"pkg"_"vers".tar.xz") + (runl "rm -rf devops/"pkgvers))) (delete-file logfile))) (define (snapshot-core version dirt)