make release: Add Debian package building and upload

Finally, a single button to push to do all the uploading.
This commit is contained in:
Carl Worth 2010-04-16 13:13:12 -07:00
parent 3461aa8dc2
commit e6d20b7b8f
3 changed files with 17 additions and 4 deletions

1
.gitignore vendored
View file

@ -13,4 +13,3 @@ libnotmuch.so*
.*.swp .*.swp
*.elc *.elc
releases releases
debian-build

View file

@ -89,11 +89,17 @@ dist: $(TAR_FILE)
release: verify-source-tree-and-version release: verify-source-tree-and-version
$(MAKE) VERSION=$(VERSION) verify-newer $(MAKE) VERSION=$(VERSION) verify-newer
$(MAKE) VERSION=$(VERSION) test $(MAKE) VERSION=$(VERSION) test
rm -rf ./debian-build
git-buildpackage
cp debian-build/notmuch_$(VERSION).tar.gz notmuch-$(VERSION).tar.gz
$(MAKE) VERSION=$(VERSION) $(GPG_FILE) $(MAKE) VERSION=$(VERSION) $(GPG_FILE)
scp $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) $(RELEASE_HOST):$(RELEASE_DIR) scp $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) $(RELEASE_HOST):$(RELEASE_DIR)
ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(PACKAGE)-$(VERSION)" ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
mkdir -p releases mkdir -p releases
mv $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) releases mv $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) releases
(cd debian-build; dput *.changes)
mv debian-build/* releases
rmdir debian-build
git tag -s -m "$(PACKAGE) $(VERSION) release" $(VERSION) git tag -s -m "$(PACKAGE) $(VERSION) release" $(VERSION)
git push origin $(VERSION) git push origin $(VERSION)
$(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce $(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce

View file

@ -69,20 +69,28 @@ repository. From here, there are just a few steps to release:
release, (taking entries from NEWS and the version from the release, (taking entries from NEWS and the version from the
version file, and creating a new commit, etc.) version file, and creating a new commit, etc.)
5) Run "make release" which will perform the following steps: 5) Run "make release" which will perform the following steps.
Note: If any problem occurs during the process, (such as a lintian
warning that you decide should be fixed), you can abort at the
prompt for your GPG passphrase and nothing will have been uploaded
yet.
* Ensure that the version consists only of digits and periods * Ensure that the version consists only of digits and periods
* Ensure that version and debian/changelog have the same version * Ensure that version and debian/changelog have the same version
* Verify that the source tree is clean * Verify that the source tree is clean
* Compile the current notmuch code (aborting release if it fails) * Compile the current notmuch code (aborting release if it fails)
* Run the notmuch test suite (aborting release if it fails) * Run the notmuch test suite (aborting release if it fails)
* Generate the final tar file * Compile a Debian package
* Copy the tar file from what was made for Debian package
* Generate a .sha1 sum file for the tar file * Generate a .sha1 sum file for the tar file
* Sign the sha1sum using your GPG setup (asks for your GPG password) * Sign the sha1sum using your GPG setup (asks for your GPG password)
* Check that no release exists with the current version * Check that no release exists with the current version
* scp the three files to appear on http://notmuchmail.org/releases * scp the three files to appear on http://notmuchmail.org/releases
* Create a LATEST-notmuch-version file (after deleting any old one) * Create a LATEST-notmuch-version file (after deleting any old one)
* Place local copies of the three files in the releases directory * Place local copies of the tar, sha1, and gpg files into releases
* Upload the Debian package
* Place a local copy of the Debian package files in releases
* Tag the entire source tree with a tag of the form X.Y.Z, and sign * Tag the entire source tree with a tag of the form X.Y.Z, and sign
the tag with your GPG key (asks for your GPG password, and you the tag with your GPG key (asks for your GPG password, and you
may need to set GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL to match may need to set GIT_COMMITTER_NAME and GIT_COMMITTER_EMAIL to match