Permalink
Browse files

Added various packaging and release helpers, mainly stolen from Kompas.

  • Loading branch information...
1 parent c00e4df commit fe4b052803aa94653c032b87ca6adb35535b3aed @mosra committed Feb 8, 2012
Showing with 207 additions and 0 deletions.
  1. +63 −0 RELEASE-HOWTO
  2. +3 −0 package/.gitignore
  3. +7 −0 package/changelog.sh
  4. +114 −0 package/download-obs.sh
  5. +11 −0 package/make-github-like-archive.sh
  6. +9 −0 package/mysql-source-arch.sh
View
@@ -0,0 +1,63 @@
++----------------------------------------------------------------------------+
+| "DON'T SCREW IT UP, PLEASE" MANUAL FOR RELEASING NEW VERSION |
++----------------------------------------------------------------------------+
+
+0. Test (build + unit tests) on Arch, Windows, and other systems
+ (see doc/Building.dox).
+
+1. Bump version numbers:
+ CMakeLists.txt (CORRADE_LIBRARY_VERSION + CORRADE_LIBRARY_SOVERSION)
+
+2. Commit:
+ git commit -m "Bump version to $version."
+
+3. Tag new version:
+ git tag -a v$version -m "Version $version."
+
+4. Add changelog entries:
+ package/debian/changelog
+ package/rpm/corrade.changes
+ package/rpm/corrade.spec
+
+5. Bump version numbers:
+ package/download-obs.sh
+ package/mysql-source-arch.sh
+ package/changelog.sh (TWICE!)
+ package/make-github-like-archive.sh (TWICE!)
+ package/rpm/corrade.spec
+ package/debian-obs/corrade.dsc
+ package/archlinux/corrade/PKGBUILD
+ package/archlinux/mingw32-corrade/PKGBUILD
+
+6. EITHER push to GitHub, download:
+ wget https://github.com/mosra/corrade/tarball/v$version/corrade-$version.tar.gz
+
+ OR create archives with:
+ cd package && ./make-github-like-archive.sh
+
+7. Update md5sums and prefix (according to tarballs) in:
+ package/archlinux/corrade/PKGBUILD (TWICE!)
+ package/archlinux/mingw32-corrade/PKGBUILD (TWICE!)
+ package/rpm/corrade.spec
+
+8. Commit update to OBS:
+ cp -RL package/debian-obs/* $obs/corrade/
+ cp package/rpm/corrade.{changes,spec} $obs/corrade/
+ cp package/corrade-$version.tar.gz $obs/corrade/
+ osc commit -m "New upstream version $version."
+
+9. If not already, push v$version to GitHub, test and update packages in AUR.
+
+10. Wait for OBS packages to build, download them, remove release number and
+ insert them into blog DB:
+ cd package
+ ./download-obs.sh
+ ./mysql-source-arch.sh
+
+11. If OBS and AUR packages succeeded, commit with:
+ git commit -m "Updated packages to $version."
+
+12. Generate full changelog for release announcement:
+ cd package && ./changelog.sh > $blog/corrade/corrade-$version-changelog.txt
+
+13. Write release announcement.
View
@@ -0,0 +1,3 @@
+download-obs
+corrade-*.tar.gz
+source-arch-*.sql
View
@@ -0,0 +1,7 @@
+#!/bin/bash
+prev=v0.2
+curr=v0.2
+
+echo -e "Corrade - changes from $(echo $prev | tr -d v) to $(echo $curr | tr -d v):\n"
+
+git log --oneline $prev..$curr | tee
View
@@ -0,0 +1,114 @@
+#!/bin/bash
+
+ver=0.2
+
+rm -r download-obs
+mkdir -p download-obs
+cd download-obs
+
+echo -n > insert.sql
+
+# $1 - path in OBS's URL
+# $2 - directory where to save
+# $3 - human readable distribution name
+# $4 - patch version
+# $5 - architecture
+# $6 - human readable architecture
+
+dl_deb_internal() {
+ package=corrade${7}_${ver}_$5
+ echo " $package.deb"
+
+ wget -nc -q http://download.opensuse.org/repositories/home:/mosra/$1/$5/corrade${7}_${ver}-${4}_$5.deb -O $package.deb
+
+ filesize=$(du -B1 $package.deb | cut -f1)
+
+ if [ $filesize = 0 ] ; then
+ echo "Error downloading http://download.opensuse.org/repositories/home:/mosra/$1/$5/corrade${7}_${ver}-${4}_$5.deb"
+ exit 1
+ fi
+
+ echo "INSERT INTO documents (sectionid, langid, classid, nick, caption, filesize, extension) VALUES (3, 2, 8, \"$2/$package\", \"Corrade $ver ($3 $6 package)\", $(du -B1 $package.deb | cut -f1), \"deb\");" >> ../insert.sql
+
+ if [ -z "$7" ] ; then
+ dl_deb_internal "$1" "$2" "$3" "$4" "$5" "$6 development" -dev
+ fi
+}
+
+dl_rpm_internal() {
+ package=corrade$7-$ver.$5
+ echo " $package.rpm"
+
+ wget -nc -q http://download.opensuse.org/repositories/home:/mosra/$1/$5/corrade$7-$ver-$4.$5.rpm -O $package.rpm
+
+ filesize=$(du -B1 $package.rpm | cut -f1)
+
+ if [ $filesize = 0 ] ; then
+ echo "Error downloading http://download.opensuse.org/repositories/home:/mosra/$1/$5/corrade$7-$ver-$4.$5.rpm"
+ exit 1
+ fi
+
+ echo "INSERT INTO documents (sectionid, langid, classid, nick, caption, filesize, extension) VALUES (3, 2, 8, \"$2/$package\", \"Corrade $ver ($3 $6 package)\", $(du -B1 $package.rpm | cut -f1), \"rpm\");" >> ../insert.sql
+
+ if [ -z "$7" ] ; then
+ dl_rpm_internal "$1" "$2" "$3" "$4" "$5" "$6 development" -devel
+ fi
+}
+
+dl_rpm() {
+ mkdir -p $2
+ cd $2
+
+ echo $2 $6
+
+ dl_rpm_internal "$1" "$2" "$3" "$4" "$5" "$6"
+
+ cd ..
+}
+
+dl_deb() {
+ mkdir -p $2
+ cd $2
+
+ echo $2 $6
+
+ dl_deb_internal "$1" "$2" "$3" "$4" "$5" "$6"
+
+ cd ..
+}
+
+dl_rpm openSUSE_11.4 opensuse-11.4 "openSUSE 11.4" 1.1 i586 32bit
+dl_rpm openSUSE_11.4 opensuse-11.4 "openSUSE 11.4" 1.1 x86_64 64bit
+
+dl_rpm openSUSE_12.1 opensuse-12.1 "openSUSE 12.1" 1.1 i586 32bit
+dl_rpm openSUSE_12.1 opensuse-12.1 "openSUSE 12.1" 1.1 x86_64 64bit
+
+dl_rpm openSUSE_Factory opensuse-factory "openSUSE Factory" 1.1 i586 32bit
+dl_rpm openSUSE_Factory opensuse-factory "openSUSE Factory" 1.1 x86_64 64bit
+
+dl_rpm Fedora_15 fedora-15 "Fedora 15" 1.1 i386 32bit
+dl_rpm Fedora_15 fedora-15 "Fedora 15" 1.1 x86_64 64bit
+
+dl_rpm Fedora_16 fedora-16 "Fedora 16" 1.1 i386 32bit
+dl_rpm Fedora_16 fedora-16 "Fedora 16" 1.1 x86_64 64bit
+
+dl_rpm Mandriva_2010.1 mandriva-2010.1 "Mandriva 2010.1" 1.2 i586 32bit
+dl_rpm Mandriva_2010.1 mandriva-2010.1 "Mandriva 2010.1" 1.2 x86_64 64bit
+
+dl_rpm Mandriva_2011 mandriva-2011 "Mandriva 2011" 1.1-mdv2011.0 i586 32bit
+dl_rpm Mandriva_2011 mandriva-2011 "Mandriva 2011" 1.1-mdv2011.0 x86_64 64bit
+
+dl_deb Debian_6.0 debian-6 "Debian 6" 1 i386 32bit
+dl_deb Debian_6.0 debian-6 "Debian 6" 1 amd64 64bit
+
+dl_deb xUbuntu_10.04 ubuntu-10.04 "Ubuntu 10.04" 1 i386 32bit
+dl_deb xUbuntu_10.04 ubuntu-10.04 "Ubuntu 10.04" 1 amd64 64bit
+
+dl_deb xUbuntu_10.10 ubuntu-10.10 "Ubuntu 10.10" 1 i386 32bit
+dl_deb xUbuntu_10.10 ubuntu-10.10 "Ubuntu 10.10" 1 amd64 64bit
+
+dl_deb xUbuntu_11.04 ubuntu-11.04 "Ubuntu 11.04" 1 i386 32bit
+dl_deb xUbuntu_11.04 ubuntu-11.04 "Ubuntu 11.04" 1 amd64 64bit
+
+dl_deb xUbuntu_11.10 ubuntu-11.10 "Ubuntu 11.10" 1 i386 32bit
+dl_deb xUbuntu_11.10 ubuntu-11.10 "Ubuntu 11.10" 1 amd64 64bit
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+rev=v0.2
+revas=v0.2
+
+cd ../
+hash=$(git rev-parse ${revas} | head -c 7)
+package=corrade-$(echo $revas | tail -c +2).tar
+echo $hash $package
+git archive --prefix=mosra-corrade-${hash}/ -o package/$package ${rev}
+gzip -nf package/$package
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+version=0.2
+
+echo "INSERT INTO documents (sectionid, langid, classid, nick, caption, filesize, extension) VALUES (3, 2, 8, \"tarball/corrade-$version\", \"Corrade $version (source package)\", $(du -B1 corrade-$version.tar.gz | cut -f1), \"tar.gz\");" > source-arch-$version.sql
+
+echo "INSERT INTO documents (sectionid, langid, classid, nick, caption, filesize, extension) VALUES (3, 2, 8, \"archlinux/corrade-$version-1\", \"Corrade $version (ArchLinux package)\", $(du -B1 archlinux/corrade/corrade-$version-1.src.tar.gz | cut -f1), \"src.tar.gz\");" >> source-arch-$version.sql
+
+echo "INSERT INTO documents (sectionid, langid, classid, nick, caption, filesize, extension) VALUES (3, 2, 8, \"archlinux/mingw32-corrade-$version-1\", \"Corrade $version (mingw32) (ArchLinux package)\", $(du -B1 archlinux/mingw32-corrade/mingw32-corrade-$version-1.src.tar.gz | cut -f1), \"src.tar.gz\");" >> source-arch-$version.sql

0 comments on commit fe4b052

Please sign in to comment.