mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
rework release procedures such that a tag and a commit is dedicated to a release,
and a second commit opens the tree for development Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
1244ff7f17
commit
e10b365491
2 changed files with 58 additions and 30 deletions
32
debian/release-build.sh
vendored
Executable file
32
debian/release-build.sh
vendored
Executable file
|
@ -0,0 +1,32 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
PKG="byobu"
|
||||||
|
MAJOR=2
|
||||||
|
|
||||||
|
error() {
|
||||||
|
echo "ERROR: $@"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
head -n1 debian/changelog | grep "unreleased" || error "This version must be 'unreleased'"
|
||||||
|
|
||||||
|
./debian/rules get-orig-source
|
||||||
|
bzr bd
|
||||||
|
sed -i "s/) unreleased;/-0ubuntu1~ppa1) hardy;/" debian/changelog
|
||||||
|
bzr bd -S
|
||||||
|
sed -i "s/ppa1) hardy;/ppa2) intrepid;/" debian/changelog
|
||||||
|
bzr bd -S
|
||||||
|
sed -i "s/ppa2) intrepid;/ppa3) jaunty;/" debian/changelog
|
||||||
|
bzr bd -S
|
||||||
|
sed -i "s/~ppa3) jaunty;/) karmic;/" debian/changelog
|
||||||
|
bzr bd -S
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "# Test this build:"
|
||||||
|
echo " sudo dpkg -i ../*.deb"
|
||||||
|
echo
|
||||||
|
echo "# If everything looks good, release:"
|
||||||
|
echo " ./debian/release.sh"
|
||||||
|
echo
|
||||||
|
echo
|
56
debian/release.sh
vendored
56
debian/release.sh
vendored
|
@ -8,50 +8,46 @@ error() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
head -n1 debian/changelog | grep "unreleased" || error "This version must be 'unreleased'"
|
head -n1 debian/changelog | grep "karmic" || error "This version must be ready for 'karmic'"
|
||||||
|
|
||||||
./debian/rules get-orig-source
|
# Tag the release in bzr
|
||||||
bzr bd
|
|
||||||
sed -i "s/) unreleased;/-0ubuntu1~ppa1) hardy;/" debian/changelog
|
|
||||||
bzr bd -S
|
|
||||||
sed -i "s/ppa1) hardy;/ppa2) intrepid;/" debian/changelog
|
|
||||||
bzr bd -S
|
|
||||||
sed -i "s/ppa2) intrepid;/ppa3) jaunty;/" debian/changelog
|
|
||||||
bzr bd -S
|
|
||||||
sed -i "s/~ppa3) jaunty;/) karmic;/" debian/changelog
|
|
||||||
bzr bd -S
|
|
||||||
minor=`head -n1 debian/changelog | sed "s/^.*($MAJOR.//" | sed "s/-.*$//"`
|
minor=`head -n1 debian/changelog | sed "s/^.*($MAJOR.//" | sed "s/-.*$//"`
|
||||||
bzr tag --delete "$MAJOR.$minor" || true
|
bzr tag --delete "$MAJOR.$minor" || true
|
||||||
bzr tag "$MAJOR.$minor"
|
bzr tag "$MAJOR.$minor"
|
||||||
|
bzr commit -m 'releasing $MAJOR.$minor'
|
||||||
|
|
||||||
|
# Sign the tarball
|
||||||
|
gpg --armor --sign --detach-sig ../"$PKG"_*.orig.tar.gz
|
||||||
|
|
||||||
|
# Create the rpm export
|
||||||
|
sudo alien --to-rpm ../$PKG"_"$MAJOR.$minor"_all.deb"
|
||||||
|
sudo alien --to-rpm ../$PKG"-extras_"$MAJOR.$minor"_all.deb"
|
||||||
|
mv -f *.rpm ..
|
||||||
|
rsync -aP ../*.rpm kirkland@people.ubuntu.com:~kirkland/public_html/$PKG/rpm
|
||||||
|
|
||||||
|
# Create the tarball export
|
||||||
|
$PKG-export -c light -f /tmp/$PKG-export.tar.gz
|
||||||
|
rsync -aP /tmp/$PKG-export.tar.gz kirkland@people.ubuntu.com:~kirkland/public_html
|
||||||
|
|
||||||
|
# Open the next release for development
|
||||||
nextminor=`expr $minor + 1`
|
nextminor=`expr $minor + 1`
|
||||||
dch -v "$MAJOR.$nextminor" "UNRELEASED"
|
dch -v "$MAJOR.$nextminor" "UNRELEASED"
|
||||||
sed -i "s/$MAJOR.$nextminor) .*;/$MAJOR.$nextminor) unreleased;/" debian/changelog
|
sed -i "s/$MAJOR.$nextminor) .*;/$MAJOR.$nextminor) unreleased;/" debian/changelog
|
||||||
sed -i "s/^Version:.*$/Version: $MAJOR.$nextminor/" rpm/$PKG.spec
|
sed -i "s/^Version:.*$/Version: $MAJOR.$nextminor/" rpm/$PKG.spec
|
||||||
sed -i "s%^Source0:.*$%Source0: http://code.launchpad.net/$PKG/trunk/$MAJOR.$nextminor/+download/byobu_$MAJOR.$nextminor.orig.tar.gz%" rpm/$PKG.spec
|
sed -i "s%^Source0:.*$%Source0: http://code.launchpad.net/$PKG/trunk/$MAJOR.$nextminor/+download/byobu_$MAJOR.$nextminor.orig.tar.gz%" rpm/$PKG.spec
|
||||||
|
bzr commit -m 'opening $MAJOR.$nextminor'
|
||||||
gpg --armor --sign --detach-sig ../"$PKG"_*.orig.tar.gz
|
|
||||||
|
|
||||||
sudo alien --to-rpm ../$PKG"_"$MAJOR.$minor"_all.deb"
|
|
||||||
sudo alien --to-rpm ../$PKG"-extras_"$MAJOR.$minor"_all.deb"
|
|
||||||
mv -f *.rpm ..
|
|
||||||
rsync -aP ../*rpm kirkland@people.ubuntu.com:~kirkland/public_html/$PKG/rpm
|
|
||||||
|
|
||||||
$PKG-export -c light -f /tmp/$PKG-export.tar.gz
|
|
||||||
rsync -aP /tmp/$PKG-export.tar.gz kirkland@people.ubuntu.com:~kirkland/public_html
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo "# To upload PPA packages:"
|
||||||
echo "To test:"
|
|
||||||
echo " sudo dpkg -i ../*.deb"
|
|
||||||
echo
|
|
||||||
echo "To upload PPA packages:"
|
|
||||||
echo " dput $PKG-ppa ../*ppa*changes"
|
echo " dput $PKG-ppa ../*ppa*changes"
|
||||||
echo
|
echo
|
||||||
echo "To commit and push:"
|
echo "# To push:"
|
||||||
echo " bzr cdiff"
|
echo " bzr push lp:$PKG"
|
||||||
echo " bzr commit -m 'releasing $MAJOR.$minor, opening $MAJOR.$nextminor' && bzr push lp:$PKG"
|
|
||||||
echo
|
echo
|
||||||
echo "Publish tarball at:"
|
echo "# Publish tarball at:"
|
||||||
echo " https://launchpad.net/$PKG/trunk/+addrelease"
|
echo " https://launchpad.net/$PKG/trunk/+addrelease"
|
||||||
echo
|
echo
|
||||||
|
echo "# Upload to Ubuntu:"
|
||||||
|
echo " dput ../${PKG}_${MAJOR}.${minor}-0ubuntu1_source.changes"
|
||||||
|
echo
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue