Home | History | Annotate | Line # | Download | only in build
mkrelease revision 1.1.1.5
      1      1.1     lukem #! /bin/sh
      2  1.1.1.4      tron # $OpenLDAP$
      3      1.1     lukem ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
      4      1.1     lukem ##
      5  1.1.1.5  christos ## Copyright 1998-2016 The OpenLDAP Foundation.
      6      1.1     lukem ## All rights reserved.
      7      1.1     lukem ##
      8      1.1     lukem ## Redistribution and use in source and binary forms, with or without
      9      1.1     lukem ## modification, are permitted only as authorized by the OpenLDAP
     10      1.1     lukem ## Public License.
     11      1.1     lukem ##
     12      1.1     lukem ## A copy of this license is available in the file LICENSE in the
     13      1.1     lukem ## top-level directory of the distribution or, alternatively, at
     14      1.1     lukem ## <http://www.OpenLDAP.org/license.html>.
     15      1.1     lukem #
     16      1.1     lukem # Make a release
     17      1.1     lukem #
     18      1.1     lukem 
     19      1.1     lukem #
     20      1.1     lukem # This script MUST NOT add files to the export nor modify
     21  1.1.1.4      tron # any file in the export, exceptions:
     22  1.1.1.4      tron #	make guide.html
     23      1.1     lukem #
     24      1.1     lukem 
     25      1.1     lukem set -e 		# exit immediately if any errors occur
     26      1.1     lukem 
     27      1.1     lukem if test $# != 3 ; then
     28  1.1.1.4      tron 	echo 'usage: mkrelease REPO RELNAME TAG'
     29      1.1     lukem 	exit 1
     30      1.1     lukem fi
     31      1.1     lukem 
     32  1.1.1.4      tron REPO=$1
     33  1.1.1.4      tron shift
     34      1.1     lukem RELNAME=openldap-$1
     35      1.1     lukem shift
     36  1.1.1.4      tron TAG=$1
     37      1.1     lukem shift
     38      1.1     lukem 
     39  1.1.1.5  christos #Linux
     40  1.1.1.5  christos #SHA="sha1sum"
     41  1.1.1.5  christos #MD="md5sum"
     42  1.1.1.5  christos #BSD
     43  1.1.1.5  christos #SHA="sha1"
     44  1.1.1.5  christos #MD="md5"
     45  1.1.1.5  christos #OpenSSL
     46  1.1.1.5  christos SHA="openssl sha1"
     47  1.1.1.5  christos MD="openssl md5"
     48  1.1.1.5  christos 
     49      1.1     lukem if test -e $RELNAME ; then
     50      1.1     lukem 	echo "error: $RELNAME exists"
     51      1.1     lukem 	exit 1
     52      1.1     lukem fi
     53      1.1     lukem 
     54      1.1     lukem echo Release: $RELNAME
     55  1.1.1.4      tron echo Tag: $TAG
     56      1.1     lukem 
     57  1.1.1.4      tron git archive --format=tar --prefix="${RELNAME}/" --remote="${REPO}" "$TAG" |  tar xvf -
     58      1.1     lukem 
     59      1.1     lukem if test ! -d $RELNAME ; then
     60      1.1     lukem 	echo "error: $RELNAME doesn't exists"
     61      1.1     lukem 	exit 1
     62      1.1     lukem fi
     63      1.1     lukem 
     64      1.1     lukem if test -e $RELNAME/doc/guide/admin/guide.sdf ; then
     65      1.1     lukem 	echo "build guide..."
     66      1.1     lukem 	( cd $RELNAME/doc/guide/admin ; make guide.html )
     67      1.1     lukem else
     68      1.1     lukem 	echo "No guide"
     69      1.1     lukem fi
     70      1.1     lukem 
     71      1.1     lukem if test -e $RELNAME/libraries/liblunicode/ucdata/uctable.h ; then
     72      1.1     lukem 	echo "touching uctable.h..."
     73      1.1     lukem 	touch $RELNAME/libraries/liblunicode/ucdata/uctable.h
     74      1.1     lukem fi
     75      1.1     lukem 
     76      1.1     lukem if test ! -e $RELNAME/build/version.sh ; then
     77      1.1     lukem 	echo "No build version"
     78      1.1     lukem 	OL_STRING="something"
     79      1.1     lukem else
     80      1.1     lukem 	eval `$RELNAME/build/version.sh`
     81      1.1     lukem fi
     82      1.1     lukem 
     83      1.1     lukem echo "Rolling up $OL_STRING ..."
     84      1.1     lukem 
     85      1.1     lukem 
     86      1.1     lukem tar cf $RELNAME.tar $RELNAME
     87      1.1     lukem gzip -9 -c $RELNAME.tar > $RELNAME.tgz
     88  1.1.1.5  christos ${MD} $RELNAME.tgz > $RELNAME.md5
     89  1.1.1.5  christos ${SHA} $RELNAME.tgz > $RELNAME.sha1
     90      1.1     lukem rm -f $RELNAME.tar
     91      1.1     lukem 
     92      1.1     lukem ls -l $RELNAME.*
     93      1.1     lukem 
     94      1.1     lukem echo "Made $OL_STRING as $RELNAME.tgz"
     95