File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ # This script compare merged pull requests between the two most recent tags
34# Please note that this script only work with Github repositories.
45# Prerequisites: git, github cli
56
67GHCLI_BIN=" gh"
78REPO=" snyk/driftctl"
8- LATEST_TAG=$( git describe --abbrev=0 ) # Get the least created tag
9- DEFAULT_BRANCH=origin/ HEAD
10- BASE=$DEFAULT_BRANCH # Change this if you don't want to use the default branch as base
9+ LATEST_TAG=$( git for-each-ref --sort=-taggerdate --format ' %(tag) ' refs/tags | sed -n 1p ) # Get the last created tag
10+ CURRENT_BRANCH= $( git rev-parse --abbrev-ref HEAD)
11+ BASE=$( git for-each-ref --sort=-taggerdate --format ' %(tag) ' refs/tags | sed -n 2p ) # Use $CURRENT_BRANCH instead to get a pre-release changelog
1112
1213# Check GH cli is installed
1314if ! which $GHCLI_BIN & > /dev/null; then
You can’t perform that action at this time.
0 commit comments