mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-12 15:50:01 -08:00
12 lines
526 B
Bash
Executable File
12 lines
526 B
Bash
Executable File
#! /usr/bin/env sh
|
|
CLI_DIR="$(dirname "$(realpath "$0")")"
|
|
VERSION=$1
|
|
[ -z "$VERSION" ] && echo no version provided && exit 1
|
|
[ "$VERSION" = "current" ] && fastanime --version && exit 0
|
|
sed -i "s/^version.*/version = \"$VERSION\"/" "$CLI_DIR/pyproject.toml" &&
|
|
sed -i "s/__version__.*/__version__ = \"v$VERSION\"/" "$CLI_DIR/fastanime/__init__.py" &&
|
|
git stage "$CLI_DIR/pyproject.toml" "$CLI_DIR/fastanime/__init__.py" &&
|
|
git commit -m "chore: bump version (v$VERSION)" &&
|
|
git push &&
|
|
gh release create "v$VERSION"
|