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.4 tron ## Copyright 1998-2014 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 lukem if test -e $RELNAME ; then 40 1.1 lukem echo "error: $RELNAME exists" 41 1.1 lukem exit 1 42 1.1 lukem fi 43 1.1 lukem 44 1.1 lukem echo Release: $RELNAME 45 1.1.1.4 tron echo Tag: $TAG 46 1.1 lukem 47 1.1.1.4 tron git archive --format=tar --prefix="${RELNAME}/" --remote="${REPO}" "$TAG" | tar xvf - 48 1.1 lukem 49 1.1 lukem if test ! -d $RELNAME ; then 50 1.1 lukem echo "error: $RELNAME doesn't exists" 51 1.1 lukem exit 1 52 1.1 lukem fi 53 1.1 lukem 54 1.1 lukem if test -e $RELNAME/doc/guide/admin/guide.sdf ; then 55 1.1 lukem echo "build guide..." 56 1.1 lukem ( cd $RELNAME/doc/guide/admin ; make guide.html ) 57 1.1 lukem else 58 1.1 lukem echo "No guide" 59 1.1 lukem fi 60 1.1 lukem 61 1.1 lukem if test -e $RELNAME/libraries/liblunicode/ucdata/uctable.h ; then 62 1.1 lukem echo "touching uctable.h..." 63 1.1 lukem touch $RELNAME/libraries/liblunicode/ucdata/uctable.h 64 1.1 lukem fi 65 1.1 lukem 66 1.1 lukem if test ! -e $RELNAME/build/version.sh ; then 67 1.1 lukem echo "No build version" 68 1.1 lukem OL_STRING="something" 69 1.1 lukem else 70 1.1 lukem eval `$RELNAME/build/version.sh` 71 1.1 lukem fi 72 1.1 lukem 73 1.1 lukem echo "Rolling up $OL_STRING ..." 74 1.1 lukem 75 1.1 lukem 76 1.1 lukem tar cf $RELNAME.tar $RELNAME 77 1.1 lukem gzip -9 -c $RELNAME.tar > $RELNAME.tgz 78 1.1 lukem md5 $RELNAME.tgz > $RELNAME.md5 79 1.1 lukem sha1 $RELNAME.tgz > $RELNAME.sha1 80 1.1 lukem rm -f $RELNAME.tar 81 1.1 lukem 82 1.1 lukem ls -l $RELNAME.* 83 1.1 lukem 84 1.1 lukem echo "Made $OL_STRING as $RELNAME.tgz" 85