1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-15 04:57:56 +00:00

scripts/prepare-release: option -b to not generate assets

Implement a new command line option "-b" to prevent the script from
creating release assets (Helm chart).
This commit is contained in:
Markus Lehtonen 2022-07-08 10:13:27 +03:00
parent 3638304c10
commit 3f084a4307

View file

@ -5,11 +5,12 @@ this=`basename $0`
usage () { usage () {
cat << EOF cat << EOF
Usage: $this [-h] RELEASE_VERSION GPG_KEY Usage: $this [-h] [-a] [-b] RELEASE_VERSION GPG_KEY
Options: Options:
-h show this help and exit -h show this help and exit
-a only generate release assets, do not patch files in the repo -a do not patch files in the repo
-b do not generate assets
Example: Example:
@ -34,10 +35,13 @@ files:
# #
# Parse command line # Parse command line
# #
assets_only= no_patching=
while getopts "ah" opt; do no_assets=
while getopts "abh" opt; do
case $opt in case $opt in
a) assets_only=y a) no_patching=y
;;
b) no_assets=y
;; ;;
h) usage h) usage
exit 0 exit 0
@ -83,7 +87,10 @@ else
exit 1 exit 1
fi fi
if [ -z "$assets_only" ]; then #
# Modify files in the repo to point to new release
#
if [ -z "$no_patching" ]; then
# Patch docs configuration # Patch docs configuration
echo Patching docs/_config.yml echo Patching docs/_config.yml
sed -e s"/release:.*/release: $release/" \ sed -e s"/release:.*/release: $release/" \
@ -123,6 +130,7 @@ fi
# #
# Create release assets to be uploaded # Create release assets to be uploaded
# #
if [ -z "$no_assets" ]; then
helm package deployment/helm/node-feature-discovery/ --version $semver helm package deployment/helm/node-feature-discovery/ --version $semver
chart_name="node-feature-discovery-chart-$semver.tgz" chart_name="node-feature-discovery-chart-$semver.tgz"
@ -140,3 +148,4 @@ cat << EOF
*** ***
******************************************************************************* *******************************************************************************
EOF EOF
fi