Skip to content

Commit

Permalink
added in the check to get the last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-ang9 committed Nov 4, 2024
1 parent 6e70cdb commit fea3948
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/manpage_generation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ CURRENT_VER=$(grep -oP '^Version:\s+\K\S+' packaging/convert2rhel.spec)

echo "Current version: $CURRENT_VER"

# Check if the spec file has changes
if git diff --quiet HEAD~1 packaging/convert2rhel.spec; then
# Get the last commit in the current branch to compare
LAST_COMMIT=$(git rev-parse HEAD)

# Check if the spec file has changes compared to the last commit
if git diff --quiet $LAST_COMMIT -- packaging/convert2rhel.spec; then
echo "Version is up-to-date."
exit 0
else
Expand Down

0 comments on commit fea3948

Please sign in to comment.