Ticket #631: 0002-Use-new-sys-build-version-variables-in-Unit-library.patch

File 0002-Use-new-sys-build-version-variables-in-Unit-library.patch, 1.6 KB (added by Jim Ursetto, 11 years ago)
  • identify-branch.sh

    From e4fc043123cc1ca5738600802d78a0ad70e02318 Mon Sep 17 00:00:00 2001
    From: Jim Ursetto <zbigniewsz@gmail.com>
    Date: Fri, 1 Jul 2011 18:15:57 -0500
    Subject: [PATCH 2/3] Use new ##sys#build-* version variables in Unit library
    
    ---
     identify-branch.sh |    4 ++--
     library.scm        |    9 ++++++---
     2 files changed, 8 insertions(+), 5 deletions(-)
    
    diff --git a/identify-branch.sh b/identify-branch.sh
    index f98c65e..89a68f1 100755
    a b  
    55# usage: identify-branch SOURCEDIR
    66
    77if test -d "$1/.git"; then
    8     branchname=`GIT_DIR="$1/.git" git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'`
     8    branchname=`GIT_DIR="$1/.git" git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
    99    case ${branchname} in
    1010        "") ;;
    11         "(master)") ;;
     11        "master") ;;
    1212        *) echo "${branchname}";;
    1313    esac
    1414fi
  • library.scm

    diff --git a/library.scm b/library.scm
    index f05256f..b930433 100644
    a b EOF 
    35523552                   (if (##sys#fudge 32) " gchooks" "")
    35533553                   (if (##sys#fudge 39) " cross" "") ) ) )
    35543554        (string-append
    3555          "Version " +build-version+ " " +branch-name+ "\n"
     3555         "Version " ##sys#build-version
     3556         (if ##sys#build-branch (string-append " (" ##sys#build-branch ")") "")
     3557         (if ##sys#build-id (string-append " (rev " ##sys#build-id ")") "")
     3558         "\n"
    35563559         (get-config)
    35573560         (if (zero? (##sys#size spec))
    35583561             ""
    35593562             (string-append " [" spec " ]") )
    35603563         "\n"
    3561          +build-tag+))
    3562       +build-version+) )
     3564         (or ##sys#build-tag "")))
     3565      ##sys#build-version) )
    35633566
    35643567
    35653568;;; Feature identifiers: