github.com/kubeflow/training-operator@v1.7.0/hack/scripts/update-changelog.sh (about)

     1  #!/bin/bash
     2  
     3  # Copyright 2018 The Kubeflow Authors.
     4  #
     5  # Licensed under the Apache License, Version 2.0 (the "License");
     6  # you may not use this file except in compliance with the License.
     7  # You may obtain a copy of the License at
     8  #
     9  #     http://www.apache.org/licenses/LICENSE-2.0
    10  #
    11  # Unless required by applicable law or agreed to in writing, software
    12  # distributed under the License is distributed on an "AS IS" BASIS,
    13  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  # See the License for the specific language governing permissions and
    15  # limitations under the License.
    16  
    17  # Update CHANGELOG.md using github_changelog_generator.
    18  #
    19  # The script will compute changes between release tags. So make sure there is
    20  # a release tag corresponding to the release you want to compute the changes
    21  # for.
    22  set -o errexit
    23  set -o nounset
    24  set -o pipefail
    25  
    26  GITHUB_TOKEN=${GITHUB_TOKEN:-"NO"}
    27  
    28  SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/../..
    29  
    30  cd ${SCRIPT_ROOT}
    31  
    32  if [ "${GITHUB_TOKEN}" == "NO" ]
    33  then
    34      echo "Environment variable GITHUB_TOKEN is not set."
    35      exit 1
    36  fi
    37  
    38  github_changelog_generator -t ${GITHUB_TOKEN} -u kubeflow -p training-operator \
    39  	--exclude-labels community/discussion,cmmunity/question,duplicate,question,invalid,wontfix \
    40  	--bug-labels kind/bug,problems/bug \
    41  	--enhancement-labels improvement/optimization,kind/enhancement,improvement/enhancement,addition/feature,kind/feature \
    42  	--enhancement-label "**Features and improvements:**" \
    43  	--max-issues=100
    44  
    45  cd - > /dev/null