From 3110cad235d61cfe66fecad3e044ce03132aa1d2 Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Sat, 13 Jun 2026 23:55:15 -0500 Subject: [PATCH 1/2] chore: add releases script Script is used to prep and push the errbot releases. --- tools/README.md | 16 ++++++++++++ tools/releases.sh | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100755 tools/releases.sh diff --git a/tools/README.md b/tools/README.md index bb418abd4..bc201fb15 100644 --- a/tools/README.md +++ b/tools/README.md @@ -11,3 +11,19 @@ These are support tools for the project `./gen_home.py` - Generates a Github wiki compatible page named `Home.md` with all the plugins using `repos.json` + +`./releases.sh` + +- automates the release process for errbot. +- creates a temporary directory, clones the repository, builds the python package, and prepares multi-arch docker images. +- **Requirements:** + - `git` + - `pipenv` + - `python 3.12` + - `podman` (for docker image builds) +- **Execution (macOS):** + 1. **Pre-requisite:** Open `tools/releases.sh` and update the `RELEASE`, `BRANCH`, and `PYTHON_VERSION` variables to match the target release. + 2. Ensure you have the requirements installed (e.g., `brew install pipenv podman`). + 3. Make the script executable: `chmod +x tools/releases.sh` + 4. Run the script from the project root: `./tools/releases.sh` + 5. Follow the manual steps printed at the end of the script to complete the publication. diff --git a/tools/releases.sh b/tools/releases.sh new file mode 100755 index 000000000..cbe653964 --- /dev/null +++ b/tools/releases.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +set -e + +# notes +## git cherry-pick ..master +## git tag +## git push upstream ${BRANCH} + +RELEASE=6.2.1 +BRANCH=6.2 +PYTHON_VERSION=3.12 + +REPO=git@github.com:errbotio/errbot.git + +RELEASE_DIR=$(mktemp -d /tmp/errbot-release-${RELEASE}.XXX) + + +function header () { + title=$@ + ORANGE='\033[0;33m' + YELLOW='\033[1;33m' + NC='\033[0m' + + echo -e "${YELLOW}==================" + echo -e "${ORANGE}${title}" + echo -e "${YELLOW}==================" + echo -e ${NC} +} + + +header "git clone" +pushd ${RELEASE_DIR} +git clone ${REPO} errbot +pushd errbot +git checkout ${BRANCH} + +header "pypi build" +pipenv --python ${PYTHON_VERSION} +pipenv run pip3 install pytest twine build + +#header "pre-release gate (version <-> CHANGES.rst)" +#pipenv run python3 -m pytest tests/release_metadata_test.py -v + +pipenv run python3 -m build + +header "Building multi-arch docker images..." +podman rmi -f errbotio/errbot:test 2>/dev/null || true +podman manifest rm errbotio/errbot:test 2>/dev/null || true +podman build --platform linux/amd64,linux/arm64 --manifest errbotio/errbot:test -f Dockerfile . + +header "Checking and uploading Python package..." +pipenv run twine check dist/* + +header "Manual: publish pypi and docker" +echo pipenv run twine upload dist/* +echo podman build --platform linux/amd64,linux/arm64 --manifest errbotio/errbot:${RELEASE} -f Dockerfile . +echo podman manifest push errbotio/errbot:${RELEASE} docker://docker.io/errbotio/errbot:${RELEASE} +echo git tag v${RELEASE} + +popd +popd From 93eae2908673842d268cd8300754139b381732bc Mon Sep 17 00:00:00 2001 From: Sijis Aviles Date: Sat, 13 Jun 2026 23:58:02 -0500 Subject: [PATCH 2/2] docs: update CHANGES --- CHANGES.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.rst b/CHANGES.rst index d5134cc50..832703528 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,6 @@ v9.9.9 (unreleased) ------------------- +- chore: add releases script (#1767) v6.2.1 (2026-06-06)