Skip to content

Commit

Permalink
Change flags to variables so that they can be passed through make
Browse files Browse the repository at this point in the history
  • Loading branch information
cblecker committed Jan 25, 2018
1 parent a107ae5 commit f801f3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion build/root/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ verify:
@echo "$$VERIFY_HELP_INFO"
else
verify: verify_generated_files
KUBE_VERIFY_GIT_BRANCH=$(BRANCH) hack/make-rules/verify.sh -v
KUBE_VERIFY_GIT_BRANCH=$(BRANCH) hack/make-rules/verify.sh
endif

define QUICK_VERIFY_HELP_INFO
Expand Down
23 changes: 4 additions & 19 deletions hack/make-rules/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,30 +129,15 @@ function run-checks {
done
}

SILENT=true
QUICK=false

while getopts ":vQ" opt; do
case ${opt} in
v)
SILENT=false
;;
Q)
QUICK=true
;;
\?)
echo "Invalid flag: -${OPTARG}" >&2
exit 1
;;
esac
done
SILENT=${SILENT:-false}
QUICK=${QUICK:-false}

if ${SILENT} ; then
echo "Running in silent mode, run with -v if you want to see script logs."
echo "Running in silent mode, run with SILENT=false if you want to see script logs."
fi

if ${QUICK} ; then
echo "Running in quick mode (-Q flag). Only fast checks will run."
echo "Running in quick mode (QUICK=true). Only fast checks will run."
fi

ret=0
Expand Down

0 comments on commit f801f3f

Please sign in to comment.