Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
v9.9.9 (unreleased)
-------------------
- chore: add releases script (#1767)


v6.2.1 (2026-06-06)
Expand Down
16 changes: 16 additions & 0 deletions tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
62 changes: 62 additions & 0 deletions tools/releases.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#!/bin/bash

set -e

# notes
## git cherry-pick <sha-of-bump-version>..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
Loading