File: tag-release.sh

package info (click to toggle)
pytouchlinesl 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 532 kB
  • sloc: python: 758; makefile: 2
file content (20 lines) | stat: -rwxr-xr-x 498 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
set -euo pipefail

export VERSION="${1:-}"

echo "$VERSION" | grep -qEo '[0-9]+\.[0-9]+\.[0-9]+'
if [ $? -ne 0 ]; then
    echo "Invalid version number. Please use the format '0.2.0'"
    exit 1
fi

# Bump version in pyproject.toml and sync the uv.lock file
sed -i 's/^\(version = \).*$/\1'\"$VERSION\"'/' pyproject.toml
uv sync

git add pyproject.toml uv.lock
git commit -m "chore: bump version to $VERSION"
git tag -a "$VERSION" -m "$VERSION"

git push origin main "$VERSION"