Skip to content

Commit

Permalink
chore: Use sed to replace version identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
lewisjared committed Apr 11, 2024
1 parent ad85be0 commit 7dd6610
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/bump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,18 @@ jobs:
# Bump
BASE_VERSION=`poetry version -s`
NEW_VERSION=`poetry version -s ${{ github.event.inputs.bump_rule }}`
NEW_VERSION=`poetry version -s ${{ github.event.inputs.bump_rule }} --dry-run`
echo "Bumping version $BASE_VERSION > $NEW_VERSION"
sed -i "s/version = \"$BASE_VERSION\"/version = \"$NEW_VERSION\"/g" pyproject.toml
poetry run towncrier build --yes --version v$NEW_VERSION
git commit -a -m "bump: version $BASE_VERSION -> $NEW_VERSION"
git tag v$NEW_VERSION
# Bump to alpha (so that future commits do not have the same
# version as the tagged commit)
BASE_VERSION=`poetry version -s`
NEW_VERSION=`poetry version -s prerelease`
NEW_VERSION=`poetry version -s prerelease --dry-run`
echo "Bumping version $BASE_VERSION > $NEW_VERSION"
sed -i "s/version = \"$BASE_VERSION\"/version = \"$NEW_VERSION\"/g" pyproject.toml
git commit -a -m "bump(pre-release): version $BASE_VERSION > $NEW_VERSION"
git push && git push --tags
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# TODO: work out how to do this well (https://gitlab.com/magicc/copier-fgen-based-repository/-/issues/1)
[project]
name = "fgen-example"
version = "0.1.0"
version = "0.2.1a11"
description = "Example project using fgen to wrap a simple module"
readme = "README.md"
authors = [{name = "Jared Lewis, email = [email protected]"}]
Expand Down

0 comments on commit 7dd6610

Please sign in to comment.