You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [ "${CONDA_DEFAULT_ENV}"="${CODEGRAPH_CONDA_ENVIRONMENT}" ] ;then
40
+
PREPARE_CONDA_ENVIRONMENT=${PREPARE_CONDA_ENVIRONMENT:-"true"}# Wether to prepare then Conda environment if needed (default, "true") or use an already prepared Conda environment ("false")
41
+
42
+
if [ "${CONDA_DEFAULT_ENV}"="${CODEGRAPH_CONDA_ENVIRONMENT}" ] && [ "${PREPARE_CONDA_ENVIRONMENT}"="false" ];then
33
43
echo"activateCondaEnvironment: Skipping activation. Target conda environment ${CODEGRAPH_CONDA_ENVIRONMENT} is already activated."
34
44
# "return" needs to be used here instead of "exit".
35
45
# This script is included in another script by using "source".
36
46
# "exit" would end the main script, "return" just ends this sub script.
37
47
return 0
38
-
fi
48
+
fi
39
49
40
50
# Include operation system function to for example detect Windows.
CHANGE_DETECTION_HASH_FILE=${CHANGE_DETECTION_HASH_FILE:-"${ARTIFACTS_CHANGE_DETECTION_HASH_FILE}"}# Name of the file that contains the hash code of the file list for change detection
22
22
CHANGE_DETECTION_HASH_FILE_PATH=${CHANGE_DETECTION_HASH_FILE_PATH:-"./${ARTIFACTS_DIRECTORY}/${CHANGE_DETECTION_HASH_FILE}"}# Default path of the file that contains the hash code of the file list for change detection. Can be overridden by a command line option.
23
23
24
+
COLOR_INFO='\033[0;30m'# dark grey
25
+
COLOR_ERROR='\033[0;31m'# red
26
+
COLOR_DEFAULT='\033[0m'
27
+
24
28
# Function to display script usage
25
29
usage() {
26
-
echo"Usage: $0 [--readonly]"
27
-
echo" [--paths <comma separated list of file and directory names> (default=artifacts)]"
28
-
echo" [--hashfile <path to the file that contains the hash for change detection> (default=env var CHANGE_DETECTION_HASH_FILE_PATH)]"
30
+
echo -e "${COLOR_ERROR}">&2
31
+
echo"Usage: $0 [--readonly]">&2
32
+
echo" [--paths <comma separated list of file and directory names> (default=artifacts)]">&2
33
+
echo" [--hashfile <path to the file that contains the hash for change detection> (default=env var CHANGE_DETECTION_HASH_FILE_PATH)]">&2
0 commit comments