github.com/stefanmcshane/helm@v0.0.0-20221213002717-88a4a2c6e77d/scripts/release-notes.sh (about) 1 #!/usr/bin/env bash 2 3 # Copyright The Helm 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 RELEASE=${RELEASE:-$2} 18 PREVIOUS_RELEASE=${PREVIOUS_RELEASE:-$1} 19 20 ## Ensure Correct Usage 21 if [[ -z "${PREVIOUS_RELEASE}" || -z "${RELEASE}" ]]; then 22 echo Usage: 23 echo ./scripts/release-notes.sh v3.0.0 v3.1.0 24 echo or 25 echo PREVIOUS_RELEASE=v3.0.0 26 echo RELEASE=v3.1.0 27 echo ./scripts/release-notes.sh 28 exit 1 29 fi 30 31 ## validate git tags 32 for tag in $RELEASE $PREVIOUS_RELEASE; do 33 OK=$(git tag -l ${tag} | wc -l) 34 if [[ "$OK" == "0" ]]; then 35 echo ${tag} is not a valid release version 36 exit 1 37 fi 38 done 39 40 ## Check for hints that checksum files were downloaded 41 ## from `make fetch-dist` 42 if [[ ! -e "./_dist/helm-${RELEASE}-darwin-amd64.tar.gz.sha256sum" ]]; then 43 echo "checksum file ./_dist/helm-${RELEASE}-darwin-amd64.tar.gz.sha256sum not found in ./_dist/" 44 echo "Did you forget to run \`make fetch-dist\` first ?" 45 exit 1 46 fi 47 48 ## Generate CHANGELOG from git log 49 CHANGELOG=$(git log --no-merges --pretty=format:'- %s %H (%aN)' ${PREVIOUS_RELEASE}..${RELEASE}) 50 if [[ ! $? -eq 0 ]]; then 51 echo "Error creating changelog" 52 echo "try running \`git log --no-merges --pretty=format:'- %s %H (%aN)' ${PREVIOUS_RELEASE}..${RELEASE}\`" 53 exit 1 54 fi 55 56 ## guess at MAJOR / MINOR / PATCH versions 57 MAJOR=$(echo ${RELEASE} | sed 's/^v//' | cut -f1 -d.) 58 MINOR=$(echo ${RELEASE} | sed 's/^v//' | cut -f2 -d.) 59 PATCH=$(echo ${RELEASE} | sed 's/^v//' | cut -f3 -d.) 60 61 ## Print release notes to stdout 62 cat <<EOF 63 ## ${RELEASE} 64 65 Helm ${RELEASE} is a feature release. This release, we focused on <insert focal point>. Users are encouraged to upgrade for the best experience. 66 67 The community keeps growing, and we'd love to see you there! 68 69 - Join the discussion in [Kubernetes Slack](https://kubernetes.slack.com): 70 - `#helm-users` for questions and just to hang out 71 - `#helm-dev` for discussing PRs, code, and bugs 72 - Hang out at the Public Developer Call: Thursday, 9:30 Pacific via [Zoom](https://zoom.us/j/696660622) 73 - Test, debug, and contribute charts: [ArtifactHub/packages](https://artifacthub.io/packages/search?kind=0) 74 75 ## Notable Changes 76 77 - Add list of 78 - notable changes here 79 80 ## Installation and Upgrading 81 82 Download Helm ${RELEASE}. The common platform binaries are here: 83 84 - [MacOS amd64](https://get.helm.sh/helm-${RELEASE}-darwin-amd64.tar.gz) ([checksum](https://get.helm.sh/helm-${RELEASE}-darwin-amd64.tar.gz.sha256sum) / $(cat _dist/helm-${RELEASE}-darwin-amd64.tar.gz.sha256)) 85 - [MacOS arm64](https://get.helm.sh/helm-${RELEASE}-darwin-arm64.tar.gz) ([checksum](https://get.helm.sh/helm-${RELEASE}-darwin-arm64.tar.gz.sha256sum) / $(cat _dist/helm-${RELEASE}-darwin-arm64.tar.gz.sha256)) 86 - [Linux amd64](https://get.helm.sh/helm-${RELEASE}-linux-amd64.tar.gz) ([checksum](https://get.helm.sh/helm-${RELEASE}-linux-amd64.tar.gz.sha256sum) / $(cat _dist/helm-${RELEASE}-linux-amd64.tar.gz.sha256)) 87 - [Linux arm](https://get.helm.sh/helm-${RELEASE}-linux-arm.tar.gz) ([checksum](https://get.helm.sh/helm-${RELEASE}-linux-arm.tar.gz.sha256sum) / $(cat _dist/helm-${RELEASE}-linux-arm.tar.gz.sha256)) 88 - [Linux arm64](https://get.helm.sh/helm-${RELEASE}-linux-arm64.tar.gz) ([checksum](https://get.helm.sh/helm-${RELEASE}-linux-arm64.tar.gz.sha256sum) / $(cat _dist/helm-${RELEASE}-linux-arm64.tar.gz.sha256)) 89 - [Linux i386](https://get.helm.sh/helm-${RELEASE}-linux-386.tar.gz) ([checksum](https://get.helm.sh/helm-${RELEASE}-linux-386.tar.gz.sha256sum) / $(cat _dist/helm-${RELEASE}-linux-386.tar.gz.sha256)) 90 - [Linux ppc64le](https://get.helm.sh/helm-${RELEASE}-linux-ppc64le.tar.gz) ([checksum](https://get.helm.sh/helm-${RELEASE}-linux-ppc64le.tar.gz.sha256sum) / $(cat _dist/helm-${RELEASE}-linux-ppc64le.tar.gz.sha256)) 91 - [Linux s390x](https://get.helm.sh/helm-${RELEASE}-linux-s390x.tar.gz) ([checksum](https://get.helm.sh/helm-${RELEASE}-linux-s390x.tar.gz.sha256sum) / $(cat _dist/helm-${RELEASE}-linux-s390x.tar.gz.sha256)) 92 - [Windows amd64](https://get.helm.sh/helm-${RELEASE}-windows-amd64.zip) ([checksum](https://get.helm.sh/helm-${RELEASE}-windows-amd64.zip.sha256sum) / $(cat _dist/helm-${RELEASE}-windows-amd64.zip.sha256)) 93 94 The [Quickstart Guide](https://helm.sh/docs/intro/quickstart/) will get you going from there. For **upgrade instructions** or detailed installation notes, check the [install guide](https://helm.sh/docs/intro/install/). You can also use a [script to install](https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3) on any system with \`bash\`. 95 96 ## What's Next 97 98 - ${MAJOR}.${MINOR}.$(expr ${PATCH} + 1) will contain only bug fixes. 99 - ${MAJOR}.$(expr ${MINOR} + 1).${PATCH} is the next feature release. This release will focus on ... 100 101 ## Changelog 102 103 ${CHANGELOG} 104 EOF