diff options
author | Scott Moser <smoser@ubuntu.com> | 2011-12-16 12:04:04 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2011-12-16 12:04:04 -0500 |
commit | 88837d56ed1cc57a954cf24c80f58f417488e5e8 (patch) | |
tree | 67bde4f05f206ce72aac01ec659f12a661cb33aa /tools | |
parent | 0c6228a36eebb3bc84924afa99f984c37c3245ca (diff) | |
download | vyos-cloud-init-88837d56ed1cc57a954cf24c80f58f417488e5e8.tar.gz vyos-cloud-init-88837d56ed1cc57a954cf24c80f58f417488e5e8.zip |
bddeb: improve 'bddeb' to read version and add bzr revno
This just removes one place where i had the version string
and additionally makes bddeb built debs have a revno in their
version
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/bddeb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/bddeb b/tools/bddeb index 5f748919..53ac9706 100755 --- a/tools/bddeb +++ b/tools/bddeb @@ -7,11 +7,19 @@ rm -Rf "${TEMP_D}"; mkdir "${TEMP_D}" set -e trap "rm -Rf '${TEMP_D}'" exit files=$(bzr ls --versioned) +revno=$(bzr revno) +version=$(awk \ + -F= '$1 ~ /version$/ { gsub("[^0-9.]","",$2); print $2; }' setup.py) mkdir "${TEMP_D}/cloud-init" -tar -cf - ${files} | tar -C "${TEMP_D}/cloud-init" -xf - +otar="$TEMP_D/cloud-init_$version~bzr${revno}.orig.tar.gz" +tar -czf - ${files} > "$otar" +tar -C "${TEMP_D}/cloud-init" -xzf - <"$otar" + if [ ! -d "${TEMP_D}/cloud-init/debian" ]; then rsync -a debian.trunk/ "${TEMP_D}/cloud-init/debian" fi +sed -i -e "s,VERSION,$version," -e "s,REVNO,bzr$revno," \ + "$TEMP_D/cloud-init/debian/changelog" cd "${TEMP_D}/cloud-init" debuild "$@" for x in ../*.deb; do |