"Fossies" - the Fresh Open Source Software Archive

Member "reptyr-reptyr-0.8.0/release.sh" (29 Sep 2020, 554 Bytes) of package /linux/privat/reptyr-reptyr-0.8.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 
    3 set -e
    4 
    5 version="$1"
    6 changelog="$2"
    7 
    8 if [ -z "$version" ]; then
    9     echo "Usage: $0 [NEW-VERSION]" >&2
   10     exit 2
   11 fi
   12 
   13 {
   14     cat <<EOF
   15 * ${version} ($(date +"%b %d, %Y"))
   16  - ${changelog-(add changelog here)}
   17 
   18 EOF
   19     cat ChangeLog
   20 } > ChangeLog.tmp
   21 mv -f ChangeLog.tmp ChangeLog
   22 
   23 if ! [ "$changelog" ]; then
   24     "$EDITOR" ChangeLog
   25 fi
   26 
   27 version="$version" perl -i -lape '/^#define REPTYR_VERSION/ && s/".*"/"$ENV{version}"/' reptyr.h
   28 
   29 git add ChangeLog reptyr.h
   30 
   31 git commit -m "reptyr $version"
   32 git tag "reptyr-$version" -m "reptyr $version" -s