-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change components.sh to run only the selected comoponent
Currently components.sh goes over all components and bumps if needed. Let's add a new parameter COMPONENTS to run with make bump-components. Also, bump-components.sh is changed to work only per this component. Signed-off-by: Ram Lavi <ralavi@redhat.com>
- Loading branch information
Showing
3 changed files
with
57 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeo pipefail | ||
|
||
CNAO_VERSION=${VERSION} # Exported from Makefile | ||
|
||
echo 'Setup temporary Go path' | ||
export GOPATH=${PWD}/_components/go | ||
mkdir -p $GOPATH | ||
export PATH=${GOPATH}/bin:${PATH} | ||
|
||
function usage() { | ||
echo "Usage: COMPONENTS='<component> <component>...' components.sh\n" | ||
echo "supported components are knmstate|kubemacpool|macvtap|all" | ||
echo "where all will select all components" | ||
} | ||
|
||
function bump_component() { | ||
local component=$1 | ||
echo $component | ||
source hack/components/bump-${component}.sh | ||
} | ||
|
||
if [ -z "${COMPONENTS}" ]; then | ||
echo "Error, no component chosen" | ||
usage | ||
exit | ||
fi | ||
|
||
#input parameter parsing | ||
for component in ${COMPONENTS}; do | ||
echo component=${component} | ||
case "${component}" in | ||
knmstate) | ||
bump_component knmstate | ||
;; | ||
kubemacpool) | ||
bump_component kubemacpool | ||
;; | ||
macvtap) | ||
bump_component macvtap | ||
;; | ||
all) | ||
bump_component knmstate | ||
bump_component kubemacpool | ||
bump_component macvtap | ||
exit | ||
;; | ||
*) | ||
echo "Error, non valid component chosen" | ||
usage | ||
shift | ||
;; | ||
esac | ||
done |