mirror of
https://github.com/rancher/rke.git
synced 2025-09-02 15:34:36 +00:00
Add pre release notes with k8s versions included
This commit is contained in:
@@ -45,9 +45,11 @@ steps:
|
|||||||
checksum:
|
checksum:
|
||||||
- sha256
|
- sha256
|
||||||
files:
|
files:
|
||||||
- "build/bin/rke_*"
|
- "build/bin/rke*"
|
||||||
prerelease: true
|
prerelease: true
|
||||||
title: "Pre-release ${DRONE_TAG}"
|
title: "Pre-release ${DRONE_TAG}"
|
||||||
|
note: ./build/bin/rke-k8sversions.txt
|
||||||
|
overwrite: true
|
||||||
when:
|
when:
|
||||||
instance:
|
instance:
|
||||||
include:
|
include:
|
||||||
@@ -66,7 +68,7 @@ steps:
|
|||||||
checksum:
|
checksum:
|
||||||
- sha256
|
- sha256
|
||||||
files:
|
files:
|
||||||
- "build/bin/rke_*"
|
- "build/bin/rke*"
|
||||||
api_key:
|
api_key:
|
||||||
from_secret: github_token
|
from_secret: github_token
|
||||||
title: "Release ${DRONE_TAG}"
|
title: "Release ${DRONE_TAG}"
|
||||||
|
34
scripts/create-releasenote.sh
Executable file
34
scripts/create-releasenote.sh
Executable file
@@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# This script will create a txt file with k8s versions which will be used as (pre) release decription by Drone
|
||||||
|
set -e -x
|
||||||
|
|
||||||
|
RELEASEFILE="./build/bin/rke-k8sversions.txt"
|
||||||
|
|
||||||
|
mkdir -p ./build/bin
|
||||||
|
|
||||||
|
echo "Creating ${RELEASEFILE}"
|
||||||
|
|
||||||
|
DEFAULT_VERSION=$(./bin/rke --quiet config --list-version)
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Non zero exit code while running 'rke config -l'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
DEFAULT_VERSION_FOUND="false"
|
||||||
|
echo "# RKE Kubernetes versions" > $RELEASEFILE
|
||||||
|
for VERSION in $(./bin/rke --quiet config --all --list-version | sort -V); do
|
||||||
|
if [ "$VERSION" == "$DEFAULT_VERSION" ]; then
|
||||||
|
echo "- \`${VERSION}\` (default)" >> $RELEASEFILE
|
||||||
|
DEFAULT_VERSION_FOUND="true"
|
||||||
|
else
|
||||||
|
echo "- \`${VERSION}\`" >> $RELEASEFILE
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$DEFAULT_VERSION_FOUND" == "false" ]; then
|
||||||
|
echo -e "\nNo default version found!" >> $RELEASEFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Done creating ${RELEASEFILE}"
|
||||||
|
|
||||||
|
cat $RELEASEFILE
|
@@ -9,6 +9,8 @@ ARCH=${ARCH:-"amd64"}
|
|||||||
SUFFIX=""
|
SUFFIX=""
|
||||||
[ "${ARCH}" != "amd64" ] && SUFFIX="_${ARCH}"
|
[ "${ARCH}" != "amd64" ] && SUFFIX="_${ARCH}"
|
||||||
|
|
||||||
|
./scripts/create-releasenote.sh
|
||||||
|
|
||||||
cd package
|
cd package
|
||||||
|
|
||||||
TAG=${TAG:-${VERSION}${SUFFIX}}
|
TAG=${TAG:-${VERSION}${SUFFIX}}
|
||||||
|
Reference in New Issue
Block a user