Skip to content

Commit

Permalink
style: refactor environment variable name to reflect change in `norla…
Browse files Browse the repository at this point in the history
…b-build-system` repository
  • Loading branch information
RedLeader962 committed Dec 16, 2023
1 parent b04693a commit e12d01a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .env.project
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@

#PROJECT_PROMPT_NAME="<MyCoolProjectPrompt>"

# Programaticaly fetch repository information
# ....Programaticaly fetch source code information.................................................
PROJECT_GIT_REMOTE_URL=$( git remote get-url origin )
PROJECT_GIT_NAME=$( basename "${PROJECT_GIT_REMOTE_URL}" .git )

# Programaticaly fetch source code information
PROJECT_PATH=$( git rev-parse --show-toplevel )
PROJECT_SRC_NAME="$( basename ${PROJECT_PATH} )"
4 changes: 2 additions & 2 deletions import_norlab_shell_script_tools_lib.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ function n2st::source_lib(){
# Note: can handle both sourcing cases
# i.e. from within a script or from an interactive terminal session
_PATH_TO_SCRIPT="$(realpath "${BASH_SOURCE[0]:-'.'}")"
_PATH_TO_SCRIPT_DIR="$(dirname "${_PATH_TO_SCRIPT}")"
_REPO_ROOT="$(dirname "${_PATH_TO_SCRIPT}")"

# ....Load environment variables from file.......................................................
cd "${_PATH_TO_SCRIPT_DIR}" || exit
cd "${_REPO_ROOT}" || exit
set -o allexport
source .env.n2st
set +o allexport
Expand Down
8 changes: 4 additions & 4 deletions tests/tests_template/run_bats_core_test_in_n2st.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
# Read N2ST_PATH Default to "./utilities/norlab-shell-script-tools"
#
# =================================================================================================
OPTIONS="$@"
PARAMS="$@"

if [[ -z $OPTIONS ]]; then
if [[ -z $PARAMS ]]; then
# Set to default bats tests directory if none specified
OPTIONS="tests/"
PARAMS="tests/"
fi


Expand All @@ -38,7 +38,7 @@ function n2st::run_n2st_testsing_tools(){

# ....Execute N2ST run_bats_tests_in_docker.bash.................................................
cd "$SUPERPROJECT_PATH"
bash "${N2ST_PATH}/tests/bats_testing_tools/run_bats_tests_in_docker.bash" "$OPTIONS"
bash "${N2ST_PATH}/tests/bats_testing_tools/run_bats_tests_in_docker.bash" "$PARAMS"

# ....Teardown...................................................................................
cd "$TMP_CWD"
Expand Down

0 comments on commit e12d01a

Please sign in to comment.