Revision 8eaa6ca2db19d78a9b601e3feebb0b609c93a46c authored by Richard Levitte on 16 December 2012, 14:49:46 UTC, committed by Richard Levitte on 16 December 2012, 14:49:46 UTC
2 parent s f83f153 + 1f7b17b
Raw File
create_version_sh.sh
#!/bin/sh

. common.sh

dir=$(dirname $(ReadLink $0))

if [ -z $1 ]; then
    branch="HEAD"
else
    branch=$1
fi

# replace rc with ~rc, so debian thinks it's smaller.
echo dt_decoration=$(git describe --tags $branch | sed 's,^release-,,;s,-,+,;s,-,~,;' | sed 's/rc/~rc/') > $dir/version.sh
echo dt_sha1sum=$(git rev-parse --short $branch) >> $dir/version.sh
back to top