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:
parent
3638304c10
commit
3f084a4307
1 changed files with 20 additions and 11 deletions
|
@ -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,13 +130,14 @@ fi
|
||||||
#
|
#
|
||||||
# Create release assets to be uploaded
|
# Create release assets to be uploaded
|
||||||
#
|
#
|
||||||
helm package deployment/helm/node-feature-discovery/ --version $semver
|
if [ -z "$no_assets" ]; then
|
||||||
|
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"
|
||||||
mv node-feature-discovery-$semver.tgz $chart_name
|
mv node-feature-discovery-$semver.tgz $chart_name
|
||||||
sign_helm_chart $chart_name
|
sign_helm_chart $chart_name
|
||||||
|
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
*** Please manually upload the following generated files to the Github release
|
*** Please manually upload the following generated files to the Github release
|
||||||
|
@ -140,3 +148,4 @@ cat << EOF
|
||||||
***
|
***
|
||||||
*******************************************************************************
|
*******************************************************************************
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue