aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/scripts/create_changelog.sh
blob: c9360d617117eebb04e546b64f2bde225713bf94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /bin/bash
# This script is used in release-it as changelog
# export RELEASE_MASTER=1 to release master changelog

set -e

master_version=$(git describe --tags --abbrev=0 --match "v[0-9].[0-9].[0-9]")
latest_verion=$(git describe --tags --abbrev=0)

if [[ $RELEASE_MASTER -eq 1 ]]; then
  auto-changelog --stdout -t changelog-master.hbs --starting-version "$master_version" --commit-limit 3
else
  auto-changelog --stdout --starting-version "$latest_verion" --unreleased-only --commit-limit false
fi