From 6c1a252394cd7d52672b67feb26a1c53c2bf2e47 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 3 Nov 2017 16:20:16 -0700 Subject: [PATCH] devops: Add codename for 17.10, host-ubuntu-version, devops:main. --- src/devops/devops.pkg | 2 +- src/devops/devops.scm | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/devops/devops.pkg b/src/devops/devops.pkg index ab2a048c4..11da6ea68 100644 --- a/src/devops/devops.pkg +++ b/src/devops/devops.pkg @@ -35,4 +35,4 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (export () devops:status devops:release - devops:build-status)) \ No newline at end of file + devops:build)) \ No newline at end of file diff --git a/src/devops/devops.scm b/src/devops/devops.scm index e61b8855a..fbbe19d56 100644 --- a/src/devops/devops.scm +++ b/src/devops/devops.scm @@ -24,6 +24,14 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ;;; See devops.texi for complete details. +(define (devops:main) + (let* ((cmdl (command-line)) + (arg1 (and (pair? cmdl) (car cmdl)))) + (cond ((equal? arg1 "status") (devops:status)) + ((equal? arg1 "release") (apply devops:release (cdr cmdl))) + ((equal? arg1 "build") (apply devops:build (cdr cmdl))) + (else (error "Unknown developer operation:" cmdl))))) + (define (devops:status) (let ((dirt (shell-lines "git status --porcelain --untracked-files=no"))) (if (file-exists? "src/runtime/version.scm") @@ -38,7 +46,7 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (lint (core-lint version (or (core-changes) '()) dirt))) (if (not (null? lint)) (begin - (log "\n# "(project-name)" "(version-string version)"\n") + (log "\n# core "(version-string version)"\n") (write-lint lint))))) (define (plugin-status plugin dirt) @@ -708,17 +716,22 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (host-ubuntu-codename host) (ubuntu-os-codename (host-os host))) +(define (host-ubuntu-version host) + (ubuntu-os-version (host-os host))) + (define (os-ubuntu? os) (string-prefix? "Ubuntu " os)) (define (ubuntu-os-codename os) - (cond ((string=? "Ubuntu 17.04" os) "zesty") + (cond ((string=? "Ubuntu 17.10" os) "artful") + ((string=? "Ubuntu 17.04" os) "zesty") ((string=? "Ubuntu 16.10" os) "yakkety") ((string=? "Ubuntu 16.04" os) "xenial") (else (error "Unexpected Ubuntu OS:" os)))) (define (ubuntu-os-version os) - (cond ((string=? "Ubuntu 17.04" os) "17.04") + (cond ((string=? "Ubuntu 17.10" os) "17.10") + ((string=? "Ubuntu 17.04" os) "17.04") ((string=? "Ubuntu 16.10" os) "16.10") ((string=? "Ubuntu 16.04" os) "16.04") (else (error "Unexpected Ubuntu OS:" os)))) -- 2.25.1