Remove skip-validate option
This commit is contained in:
committed by
joonho.whangbo
parent
545ab11495
commit
b5d7e2f6cb
@@ -36,10 +36,7 @@ usage() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo "Options"
|
echo "Options"
|
||||||
echo " --help -h : Display this message"
|
echo " --help -h : Display this message"
|
||||||
|
|
||||||
echo " --force -f : Skip all prompts and checks"
|
|
||||||
echo " --verbose -v : Verbose printout"
|
echo " --verbose -v : Verbose printout"
|
||||||
|
|
||||||
echo " --use-unpinned-deps -ud : Use unpinned conda environment"
|
echo " --use-unpinned-deps -ud : Use unpinned conda environment"
|
||||||
|
|
||||||
echo " --skip -s N : Skip step N in the list above. Use multiple times to skip multiple steps ('-s N -s M ...')."
|
echo " --skip -s N : Skip step N in the list above. Use multiple times to skip multiple steps ('-s N -s M ...')."
|
||||||
@@ -57,7 +54,6 @@ usage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TOOLCHAIN_TYPE="riscv-tools"
|
TOOLCHAIN_TYPE="riscv-tools"
|
||||||
FORCE_FLAG=""
|
|
||||||
VERBOSE=false
|
VERBOSE=false
|
||||||
VERBOSE_FLAG=""
|
VERBOSE_FLAG=""
|
||||||
USE_UNPINNED_DEPS=false
|
USE_UNPINNED_DEPS=false
|
||||||
@@ -71,8 +67,6 @@ do
|
|||||||
usage 3 ;;
|
usage 3 ;;
|
||||||
riscv-tools | esp-tools)
|
riscv-tools | esp-tools)
|
||||||
TOOLCHAIN_TYPE=$1 ;;
|
TOOLCHAIN_TYPE=$1 ;;
|
||||||
--force | -f | --skip-validate)
|
|
||||||
FORCE_FLAG=$1 ;;
|
|
||||||
--verbose | -v)
|
--verbose | -v)
|
||||||
VERBOSE_FLAG=$1
|
VERBOSE_FLAG=$1
|
||||||
set -x ;;
|
set -x ;;
|
||||||
@@ -201,17 +195,14 @@ source $CYDIR/scripts/fix-open-files.sh"
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$FORCE_FLAG" ]; then
|
if [ -z ${CONDA_DEFAULT_ENV+x} ]; then
|
||||||
if [ -z ${CONDA_DEFAULT_ENV+x} ]; then
|
echo "!!!!! WARNING: No conda environment detected. Did you activate the conda environment (e.x. 'conda activate base')?"
|
||||||
error "ERROR: No conda environment detected. Did you activate the conda environment (e.x. 'conda activate base')?"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# initialize all submodules (without the toolchain submodules)
|
# initialize all submodules (without the toolchain submodules)
|
||||||
if run_step "2"; then
|
if run_step "2"; then
|
||||||
begin_step "2" "Initializing Chipyard submodules"
|
begin_step "2" "Initializing Chipyard submodules"
|
||||||
$CYDIR/scripts/init-submodules-no-riscv-tools.sh $FORCE_FLAG
|
$CYDIR/scripts/init-submodules-no-riscv-tools.sh
|
||||||
exit_if_last_command_failed
|
exit_if_last_command_failed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -13,20 +13,14 @@ common_setup
|
|||||||
|
|
||||||
function usage
|
function usage
|
||||||
{
|
{
|
||||||
echo "Usage: $0 [--force]"
|
echo "Usage: $0"
|
||||||
echo "Initialize Chipyard submodules and setup initial env.sh script."
|
echo "Initialize Chipyard submodules and setup initial env.sh script."
|
||||||
echo ""
|
echo ""
|
||||||
echo " --force -f : Skip prompt checking for tagged release"
|
|
||||||
echo " --skip-validate : DEPRECATED: Same functionality as --force"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCE=false
|
|
||||||
while test $# -gt 0
|
while test $# -gt 0
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--force | -f | --skip-validate)
|
|
||||||
FORCE=true;
|
|
||||||
;;
|
|
||||||
-h | -H | --help | help)
|
-h | -H | --help | help)
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
@@ -59,32 +53,6 @@ fi
|
|||||||
# before doing anything verify that you are on a release branch/tag
|
# before doing anything verify that you are on a release branch/tag
|
||||||
save_bash_options
|
save_bash_options
|
||||||
set +e
|
set +e
|
||||||
git_tag=$(git describe --exact-match --tags)
|
|
||||||
git_tag_rc=$?
|
|
||||||
restore_bash_options
|
|
||||||
if [ "$git_tag_rc" -ne 0 ]; then
|
|
||||||
if [ "$FORCE" == false ]; then
|
|
||||||
while true; do
|
|
||||||
printf '\033[2J'
|
|
||||||
read -p "WARNING: You are not on an official release of Chipyard."$'\n'"Type \"y\" to continue if this is intended or \"n\" if not: " validate
|
|
||||||
case "$validate" in
|
|
||||||
y | Y)
|
|
||||||
echo "Continuing on to setting up non-official Chipyard release repository"
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
n | N)
|
|
||||||
error "See https://chipyard.readthedocs.io/en/stable/Chipyard-Basics/Initial-Repo-Setup.html#setting-up-the-chipyard-repo for setting up an official release of Chipyard. "
|
|
||||||
exit 3
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
error "Invalid response. Please type \"y\" or \"n\""
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Setting up official Chipyard release: $git_tag"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$RDIR"
|
cd "$RDIR"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user