Skip to content

Commit

Permalink
Optimizations to the git script
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander.heidrich committed Feb 20, 2020
1 parent f4eab23 commit 58e1687
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions ReleaseNotesBundle/Command/GitChangelog.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash

#get tag of actual version
actualVersionTag=$(git tag | tail -1)
actualVersionHash=$(git rev-list -n 1 $actualVersionTag)
ACTUAL_VERSION_TAG=$(git tag | tail -1)

#get tag of the version before actual version
beforeVersionTag=$(git tag | tail -3 | head -n 1)
beforeVersionHash=$(git rev-list -n 1 $beforeVersionTag)
PREVIOUS_VERSION_TAG=$(git tag | tail -3 | head -n 1)

#echo $listOfTickets
git log --pretty="format:%s" $beforeVersionHash..$actualVersionHash
git log --pretty="format:%s" "$PREVIOUS_VERSION_TAG".."$ACTUAL_VERSION_TAG"
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"keywords": ["log","logging","git log"],
"require": {
"php": ">=7.0.0",
"ext-json": "*",
"phpunit/phpunit": "^8.5",
"symfony/console": "*",
"guzzlehttp/guzzle": "*"

},
"license": "MIT",
"authors": [
Expand Down

0 comments on commit 58e1687

Please sign in to comment.