Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,14 @@ jobs:
git --version
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git fetch origin main # Add this line to fetch the main branch
git branch feat/merge-test
git switch feat/merge-test
touch merge-test
echo 'merge-test' > merge-test
git add merge-test
git commit -m "merge-test"
git checkout main
git checkout main # Use explicit branch name instead of variable
git merge feat/merge-test --no-ff --commit --no-edit

git log
Expand Down
12 changes: 5 additions & 7 deletions version-bump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,22 +175,20 @@ fi
# Allow git commit messages to override bump value
# Check for #major or #minor in commit message and increment the relevant version number

merge_commit=$(git log --merges -n 1)

echo "----------------------------------------------"
echo "---------- version-bump-action ---------------"
echo "----------------------------------------------"
echo "commits_for_bump:"
echo "$commits_for_bump"
echo " "
echo "----------------------------------------------"
echo " "
echo "merge_commit:"
echo "$merge_commit"

if grep -qE 'feat' <<< $(echo $merge_commit);then
if grep -qE 'feat' <<< $(echo $commits_for_bump);then
echo "feature git commit detected"
minor=1
fi

if grep -qE 'fix|bug|patch|test' <<< $(echo $merge_commit);then
if grep -qE 'fix|bug|patch|test' <<< $(echo $commits_for_bump);then
echo "fix|bug|patch|test git commit detected"
patch=1
fi
Expand Down
Loading