diff options
Diffstat (limited to '')
-rwxr-xr-x | .travis/create_changelog.sh (renamed from .travis/generate_changelog_for_release.sh) | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/.travis/generate_changelog_for_release.sh b/.travis/create_changelog.sh index d7066aa9b..8d4c12ee1 100755 --- a/.travis/generate_changelog_for_release.sh +++ b/.travis/create_changelog.sh @@ -1,16 +1,24 @@ -#!/bin/bash - +#!/usr/bin/env bash +# +# Copyright: SPDX-License-Identifier: GPL-3.0-or-later +# +# Author : Pavlos Emm. Katsoulakis (paul@netdata.cloud) set -e -if [ ! -f .gitignore ]; then - echo "Run as ./travis/$(basename "$0") from top level directory of git repository" - exit 1 +# If we are not in netdata git repo, at the top level directory, fail +TOP_LEVEL=$(basename "$(git rev-parse --show-toplevel)") +CWD=$(git rev-parse --show-cdup || echo "") +if [ -n "$CWD" ] || [ ! "${TOP_LEVEL}" == "netdata" ]; then + echo "Run as .travis/$(basename "$0") from top level directory of netdata git repository" + echo "Changelog creation aborted" + exit 1 fi ORGANIZATION=$(echo "$TRAVIS_REPO_SLUG" | awk -F '/' '{print $1}') PROJECT=$(echo "$TRAVIS_REPO_SLUG" | awk -F '/' '{print $2}') GIT_MAIL=${GIT_MAIL:-"bot@netdata.cloud"} GIT_USER=${GIT_USER:-"netdatabot"} + if [ -z ${GIT_TAG+x} ]; then OPTS="" else @@ -18,20 +26,21 @@ else fi if [ ! "${TRAVIS_REPO_SLUG}" == "netdata/netdata" ]; then - echo "Beta mode on ${TRAVIS_REPO_SLUG}, nothing else to do" + echo "Beta mode on ${TRAVIS_REPO_SLUG}, nothing else to do here" exit 0 fi echo "--- Creating changelog ---" git checkout master git pull -#docker run -it --rm -v "$(pwd)":/usr/local/src/your-app ferrarimarco/github-changelog-generator:1.14.3 \ + docker run -it -v "$(pwd)":/project markmandel/github-changelog-generator:latest \ --user "${ORGANIZATION}" \ --project "${PROJECT}" \ --token "${GITHUB_TOKEN}" \ --since-tag "v1.10.0" \ - --no-issues \ --unreleased-label "**Next release**" \ + --no-issues \ --exclude-labels "stale,duplicate,question,invalid,wontfix,discussion,no changelog" \ - --no-compare-link ${OPTS} + --max-issues 500 \ + --bug-labels IGNOREBUGS ${OPTS} |