exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

bump (878B)


      1 #!/usr/bin/env bash
      2 # This file is in the public domain.
      3 set -eu
      4 
      5 if [ $# != 1 ]; then
      6     >&2 echo "Illegal number of arguments"
      7     >&2 echo "Usage: $0 <version>"
      8     exit -1
      9 fi
     10 
     11 PACKAGE=taler-exchange
     12 VERSION="$1"
     13 DATE="$(date -R)"
     14 GIT_USER="$(git config user.name)"
     15 GIT_EMAIL="$(git config user.email)"
     16 
     17 function updated {
     18     local FILE=$1
     19     if [[ $(grep "${VERSION}" "${FILE}") ]]; then
     20         echo "${FILE} already in ${VERSION}"
     21         return -1
     22     fi
     23 }
     24 
     25 # update debian/changelog
     26 function debian_changelog {
     27     updated debian/changelog || return 0
     28 
     29     cat <<EOF > ./debian/changelog.tmp
     30 $PACKAGE (${VERSION}) unstable; urgency=low
     31 
     32   * Release ${VERSION}.
     33 
     34  -- ${GIT_USER} <${GIT_EMAIL}>  ${DATE}
     35 
     36 EOF
     37     cat ./debian/changelog >> ./debian/changelog.tmp
     38     mv ./debian/changelog.tmp ./debian/changelog
     39     echo "debian/changelog ${VERSION}"
     40 }
     41 debian_changelog