diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2020-12-31 07:14:19 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2020-12-31 07:27:51 +0100 |
commit | 59ebb850386c174979847a9a40f10a65850c0988 (patch) | |
tree | 41e12863e2799f468b125e0f2e2deb50a01f1e68 | |
parent | b825738de2f33ffd893f4d1fd2c777d1a7436d32 (diff) | |
download | blogc-59ebb850386c174979847a9a40f10a65850c0988.tar.gz blogc-59ebb850386c174979847a9a40f10a65850c0988.tar.bz2 blogc-59ebb850386c174979847a9a40f10a65850c0988.zip |
build: debian: fix versioning and ship all deb artifacts
-rwxr-xr-x | build-aux/build-debian.sh | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/build-aux/build-debian.sh b/build-aux/build-debian.sh index 1f9aa40..6932175 100755 --- a/build-aux/build-debian.sh +++ b/build-aux/build-debian.sh @@ -29,7 +29,7 @@ create_reprepro_conf() { echo "Label: blogc-snapshot" echo "Codename: ${dist}" echo "Architectures: amd64" - echo "Components: ${dist}" + echo "Components: main" echo "Description: Apt repository containing blogc snapshots" echo done @@ -39,8 +39,7 @@ download_pbuilder_chroots ${MAKE_CMD:-make} dist-xz -MY_PV="$(echo ${PV} | sed -e 's/-dirty//g' -e 's/-/./g')" -MY_P="${PN}_${MY_PV}" +MY_P="${PN}_${PV}" mv ${P}.tar.xz "../${MY_P}.orig.tar.xz" @@ -53,13 +52,35 @@ for dir in /tmp/pbuilder/*/base.cow; do tar -xf "../${MY_P}.orig.tar.xz" -C .. cp -r ../debian "../${P}/" + REV= + case ${DIST} in + buster) + REV="1~10buster" + ;; + bullseye) + REV="1~11bullseye" + ;; + sid) + REV="1~sid" + ;; + focal) + REV="1~11.0focal" + ;; + groovy) + REV="1~11.1groovy" + ;; + *) + echo "error: unsupported dist: ${DIST}" + ;; + esac + pushd "../${P}" > /dev/null # do not mess with changelog for releases, it should be done manually during version bump if [[ ${PV} == *-* ]]; then dch \ --distribution "${DIST}" \ - --newversion "${MY_PV}-1" \ + --newversion "${PV}-${REV}" \ "snapshot" fi @@ -92,3 +113,7 @@ tar \ --exclude ./deb-repo/conf \ --exclude ./deb-repo/db \ ./deb-repo + +tar \ + -cJf "blogc-deb-${PV}.tar.xz" \ + ./deb |