2022-10-04 06:17:30 +00:00
|
|
|
#!/bin/bash
|
2024-09-22 13:53:31 +00:00
|
|
|
. fastlane/.env.$1
|
2022-10-04 06:17:30 +00:00
|
|
|
|
|
|
|
RELEASES=(`grep -n "^## " $CHANGELOG | sed -E "s/^([0-9]+).*$/\1/g"`)
|
|
|
|
UNRELEASED=${RELEASES[0]}
|
|
|
|
LATEST=${RELEASES[1]}
|
|
|
|
|
|
|
|
if [ ! $LATEST ]; then
|
|
|
|
LATEST=`cat $CHANGELOG | wc -l`
|
|
|
|
cat $CHANGELOG | tail -n $((LATEST - UNRELEASED - 1))
|
|
|
|
exit
|
|
|
|
fi
|
2023-04-07 10:08:55 +00:00
|
|
|
|
|
|
|
if [ "$2" = "stripped" ]; then
|
|
|
|
SED_STRIPPED="sed -E 's/^(.*)\. \[.*$/\1./'"
|
|
|
|
else
|
|
|
|
SED_STRIPPED="cat"
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat $CHANGELOG | head -n $((LATEST - 1)) | tail -n $((LATEST - UNRELEASED - 2)) | eval $SED_STRIPPED
|