From ed28a7d3b4390bd57638baecfb495deb4bbee743 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 25 Sep 2026 01:32:50 +0100 Subject: Add hacking instructions. --- HACKING.md | 35 +++++++++++++++++++++ release-email.scm | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 HACKING.md create mode 100755 release-email.scm diff --git a/HACKING.md b/HACKING.md new file mode 100644 index 0000000..b2a56ef --- /dev/null +++ b/HACKING.md @@ -0,0 +1,35 @@ +# Set up development environment + +Drop into a development environment using `guix shell`. +``` +guix shell -Df guix.scm +``` + +# Build the website + +``` +guix build -L .guix -f guile-xapian-website.scm +``` + +# Make a release +## Bump version +Bump version in `configure.ac`. +## Tag a release +Tag (annotated and signed; use the -ase flags to `git tag`) a release `vx.x.x` putting news into the tag message. +## Create a release tarball, test it, and sign it +``` +cp $(guix build -L .guix -f .guix/guile-xapian-distribution.scm) guile-xapian-x.x.x.tar.lz +guix build -L .guix --with-source=guile-xapian=guile-xapian-x.x.x.tar.lz -e '(@@ (guile-xapian-package) guile-xapian)' +guix build -L .guix --with-source=guile2.2-xapian=guile-xapian-x.x.x.tar.lz -e '(@@ (guile-xapian-package) guile2.2-xapian)' +gpg --detach-sign --armor guile-xapian-x.x.x.tar.lz +``` +## Publish release tarball +Add release tarball and signature to website. +## Update Guix package +## Publicize +Publicize on +- [guile-xapian public inbox](mailto:guile-xapian@systemreboot.net) +- [guile-user mailing list](mailto:guile-user@gnu.org) +- the fediverse + +A mail template is available in `release-email.scm`. If you have your default mail client configured correctly, you can simply run `./release-email.scm` to open your mail client with the announcement e-mail filled in. diff --git a/release-email.scm b/release-email.scm new file mode 100755 index 0000000..98748c9 --- /dev/null +++ b/release-email.scm @@ -0,0 +1,92 @@ +#! /usr/bin/env guile +!# + +;;; guile-xapian --- Guile bindings for Xapian +;;; Copyright © 2026 Arun Isaac +;;; +;;; This file is part of guile-xapian. +;;; +;;; guile-xapian is free software: you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License as +;;; published by the Free Software Foundation, either version 2 of the +;;; License, or (at your option) any later version. +;;; +;;; guile-xapian is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with guile-xapian. If not, see +;;; . + +(use-modules (rnrs io ports) + (srfi srfi-1) + (srfi srfi-26) + (srfi srfi-28) + (srfi srfi-171) + (ice-9 match) + (ice-9 popen) + (web uri)) + +(define (call-with-input-pipe command proc) + "Call @var{proc} with input pipe to @var{command}. @var{command} is a +list of program arguments." + (match command + ((prog args ...) + (let ((port #f)) + (dynamic-wind + (lambda () + (set! port (apply open-pipe* OPEN_READ prog args))) + (cut proc port) + (lambda () + (unless (zero? (close-pipe port)) + (error "Command invocation failed" command)))))))) + +(let* ((version + (match (call-with-input-pipe (list "git" "tag") + (cut port-transduce + (tmap identity) + rcons + get-line + <>)) + (() + (error "No git tags found")) + (tags + (string-trim (last tags) #\v)))) + (body (format " +Hi all, + +guile-xapian ~a has been released. + +guile-xapian provides Guile bindings for Xapian[1], a search engine +library used in popular applications such as the notmuch email +system. Xapian is a highly adaptable toolkit which allows developers to +easily add advanced indexing and search facilities to their own +applications. It has built-in support for several families of weighting +models and also supports a rich set of boolean query operators. + +[1]: https://xapian.org/ + +Please find links to the project home page and tarball below. The +changes in this release are described in the NEWS file in the tarball. + +https://guile-xapian.systemreboot.net/ +https://guile-xapian.systemreboot.net/releases/guile-xapian-~a.tar.lz +https://guile-xapian.systemreboot.net/releases/guile-xapian-~a.tar.lz.asc + +Cheers! +" + version version version))) + (system* "xdg-open" + (string-append "mailto:guile-xapian@systemreboot.net?" + (string-join + (map (match-lambda + ((key . value) + (string-append key "=" (uri-encode value)))) + `(("to" . "guile-user@gnu.org") + ("subject" . ,(format "guile-xapian ~a released" + version)) + ("body" . ,body))) + "&")))) + -- cgit 1.4.1