Ignore:
Timestamp:
Sep 29, 2005, 3:11:40 AM (15 years ago)
Author:
bcornec
Message:

Finer use of the release concept for tagging and delivery

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/tools/mksvnversion

    r32 r33  
     1#!/bin/bash
    12########################################################
    23# $Id$
     
    56# on every build, record the working copy revision string
    67#
    7 echo -n 'const char* svn_version(void) { const char* SVN_Version = "' > svn_version.c
    8 svnversion -n .. >> svn_version.c
    9 echo '"; return SVN_Version; }'   >> svn_version.c
     8dname=`dirname $0`
     9prem=`echo $dname |cut -c1`
     10if [ ${prem} == "/" ]; then
     11    export TOOLHOME=$dname
     12else
     13    export TOOLHOME=${PWD}/$dname
     14fi
     15. $TOOLHOME/rpm-env
     16
     17#
     18# Create a .c file for mondo to link with and get
     19# the right build version from SVN
     20#
     21rel=`svnversion $TOOLHOME/..`
     22cat > $TOOLHOME/../mondo/svn_version.c << EOF
     23const char* svn_version(void) {
     24    const char* SVN_Version = "${rel}";
     25    return SVN_Version;
     26}"
     27EOF
     28
     29#
     30# Patches the file needing that release reference
     31#
     32perl -pi -e "s/^Release:.*$/Release:    ${rel}" $TOOLHOME/../*/*spec
     33
     34#
     35# return the release
     36#
     37echo ${rel}
Note: See TracChangeset for help on using the changeset viewer.