Skip to content

Commit

Permalink
chore: Update Taskfile.dist.yml and bump.sh scripts
Browse files Browse the repository at this point in the history
- Update `stop` task in Taskfile.dist.yml to halt Virtualbox VM without parallel option.
- Correct the command in `destroy` task of Taskfile.dist.yml to clear known_hosts file.
- Amend the sed commands in bump.sh to properly update version strings in project files.
- Provide instructions for reviewing and editing the generated CHANGELOG.md file before committing.
- Adjust commit message to reflect the changes made.
  • Loading branch information
Searge committed Apr 22, 2024
1 parent 135981a commit 63a08e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Taskfile.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ tasks:
stop:
cmds:
- vagrant halt --parallel
- vagrant halt
desc: Stop Virtualbox VM

destroy:
dir: "{{.USER_WORKING_DIR}}"
cmds:
- vagrant destroy -f --parallel
- echo '' | known_hosts
- echo '' > known_hosts
desc: Delete Virtualbox VM from disk

status:
Expand Down
25 changes: 14 additions & 11 deletions scripts/bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,36 @@ else
fi
echo "Bumping version from $VERSION to v$NEW_VERSION"

# Update the version in the pyproject.toml file
# Update the version in the project files
sed -i "s/version = \"$VERSION\"/version = \"v$NEW_VERSION\"/g" pyproject.toml
# Update the version in the CITATION.cff file
sed -i "s/version: $VERSION/version: v$NEW_VERSION/g" CITATION.cff

# Update the CHANGELOG.md file with git-cliff
# Generate the CHANGELOG.md file (without committing)
if ! command -v git-cliff &> /dev/null
then
echo "git-cliff could not be found. Please install git-cliff to generate the CHANGELOG.md file."
exit 1
echo "git-cliff could not be found. Please install git-cliff to generate the CHANGELOG.md file."
exit 1
fi

if [ -z "$USER_VERSION" ]; then
git-cliff --tag v$NEW_VERSION --output CHANGELOG.md
git-cliff --tag v$NEW_VERSION --output CHANGELOG.md
else
git-cliff --output CHANGELOG.md
git-cliff --output CHANGELOG.md
fi

# Commit the changes
# Allow editing of CHANGELOG.md
echo "************************************************************"
echo "* CHANGELOG.md has been generated. Please review and edit *"
echo "* it if necessary before proceeding. *"
echo "************************************************************"
read -p "Press [Enter] when you're ready to commit the changes..."

# Commit the changes (including the edited CHANGELOG.md)
git add pyproject.toml CITATION.cff CHANGELOG.md
# Write the conventional commit message
git commit -m ":bookmark:: bump version to v$NEW_VERSION"
# Tag the commit
git tag "v$NEW_VERSION"

# Push the changes
git push origin v$NEW_VERSION -f

exit $?

0 comments on commit 63a08e7

Please sign in to comment.