Files
unitdore/scripts/bump-version.sh
T
warkanum d1d0889eb3 build: bump Gentoo and Void versions in release-version
Move version bumping into scripts/bump-version.sh, rename the ebuild per release, reset the Void checksum, and add make pkg-checksums to fill it after the release.
2026-10-12 20:57:37 +02:00

24 lines
963 B
Bash
Executable File

#!/bin/sh
# Usage: scripts/bump-version.sh X.Y.Z
# Updates the version in source and every package definition.
# Run from the repo root. Void checksum is reset: fill it with
# scripts/update-checksums.sh once the release tarball exists.
set -eu
VER="${1:?usage: $0 X.Y.Z}"
EBUILD_DIR=pkg/gentoo/app-containers/unitdore
sed -i "s/^var version = .*/var version = \"$VER\"/" cmd/root.go
sed -i "s/^pkgver=.*/pkgver=$VER/" pkg/arch/PKGBUILD
sed -i "s/^Version:.*/Version: $VER/" pkg/centos/unitdore.spec
# Gentoo: the version lives in the ebuild file name
OLD_EBUILD=$(ls "$EBUILD_DIR"/unitdore-*.ebuild | head -n1)
NEW_EBUILD="$EBUILD_DIR/unitdore-$VER.ebuild"
[ "$OLD_EBUILD" = "$NEW_EBUILD" ] || git mv "$OLD_EBUILD" "$NEW_EBUILD"
# Void: version bump invalidates the checksum
sed -i -e "s/^version=.*/version=$VER/" \
-e "s/^revision=.*/revision=1/" \
-e "s/^checksum=.*/checksum=UPDATE_AFTER_RELEASE/" pkg/void/srcpkgs/unitdore/template