File: pre-release.sh

package info (click to toggle)
pytest-codspeed 4.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,608 kB
  • sloc: ansic: 9,792; python: 2,066; sh: 41; makefile: 14
file content (21 lines) | stat: -rwxr-xr-x 608 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
set -e

VERSION=v$BUMPVER_NEW_VERSION

# Skip alpha/beta/rc changelog generation
if [[ $VERSION == *"alpha"* ]] || [[ $VERSION == *"beta"* ]] || [[ $VERSION == *"rc"* ]]; then
    echo "Skipping changelog generation for alpha/beta/rc release"
else
    echo "Generating changelog for $VERSION"
    # Check that GITHUB_TOKEN is set
    if [ -z "$GITHUB_TOKEN" ]; then
        echo "GITHUB_TOKEN is not set. Trying to fetch it from gh"
        GITHUB_TOKEN=$(gh auth token)
    fi
    git cliff --unreleased --tag $VERSION --prepend CHANGELOG.md
    git add CHANGELOG.md
fi

uv lock
git add uv.lock