Compare commits

..

2 Commits

Author SHA1 Message Date
4146a0d297 v4.3.1
=====================================================================

- MacOS does some weird stuff with the homebrew prefix apparently
2024-04-16 10:39:19 -06:00
8f3e862086 v4.3.0
=====================================================================

--- Changes ------------------------------

- updated python scwrypts API to use latest pattern established in the
  nodejs library

- SCWRYPTS_ROOT__scwrypts is now supports loading with each run and
  detects managed installations vs manual installations; this now means
  SCWRYPTS_ROOT can no longer be injected to scwrypts (this was a v2
  legacy support thing and probably does not apply to you)

--- New Features -------------------------

- pypi/scwrypts )
     added 'get_generator' API to testing utilities to provide a nice
     way to include default generator options

--- Bug Fixes ----------------------------

- scwrypts groups which use a required environment name regex no longer
  load specialized static files outside of the required environments.
2024-04-16 09:17:40 -06:00
2 changed files with 8 additions and 3 deletions

View File

@ -84,7 +84,7 @@ source "$(dirname $(readlink -f "$0"))/zsh/lib/import.driver.zsh" || exit 42
--version ) --version )
case $SCWRYPTS_INSTALLATION_TYPE in case $SCWRYPTS_INSTALLATION_TYPE in
manual ) echo "scwrypts $(GIT_SCWRYPTS describe --tags) (via GIT)" ;; manual ) echo "scwrypts $(GIT_SCWRYPTS describe --tags) (via GIT)" ;;
* ) echo scwrypts $(cat "$SCWRYPTS_ROOT__scwrypts/VERSION") ;; * ) echo "scwrypts $(cat "$SCWRYPTS_ROOT__scwrypts/VERSION")" ;;
esac esac
return 0 return 0
;; ;;

View File

@ -1,7 +1,11 @@
[[ $__SCWRYPT -eq 1 ]] && return 0 [[ $__SCWRYPT -eq 1 ]] && return 0
##################################################################### #####################################################################
SCWRYPTS_ROOT="$(cd -- ${0:a:h}; git rev-parse --show-toplevel 2>/dev/null)" # Apparently MacOS puts ALL of the homebrew stuff inside of a top level git repository
# with bizarre git ignores; so:
# - USE the git root if it's a manual install...
# - UNLESS that git root is just the $(brew --prefix)
SCWRYPTS_ROOT="$(cd -- ${0:a:h}; git rev-parse --show-toplevel 2>/dev/null | grep -v "^$(brew --prefix 2>/dev/null)$")"
[ $SCWRYPTS_ROOT ] && [ -d "$SCWRYPTS_ROOT" ] \ [ $SCWRYPTS_ROOT ] && [ -d "$SCWRYPTS_ROOT" ] \
|| SCWRYPTS_ROOT="$(echo "${0:a:h}" | sed -n 's|\(share/scwrypts\).*$|\1|p')" || SCWRYPTS_ROOT="$(echo "${0:a:h}" | sed -n 's|\(share/scwrypts\).*$|\1|p')"
@ -11,12 +15,13 @@ SCWRYPTS_ROOT="$(cd -- ${0:a:h}; git rev-parse --show-toplevel 2>/dev/null)"
exit 1 exit 1
} }
export SCWRYPTS_ROOT__scwrypts="$SCWRYPTS_ROOT"
[ -f "$SCWRYPTS_ROOT__scwrypts/MANAGED_BY" ] \ [ -f "$SCWRYPTS_ROOT__scwrypts/MANAGED_BY" ] \
&& export SCWRYPTS_INSTALLATION_TYPE=$(cat "$SCWRYPTS_ROOT__scwrypts/MANAGED_BY") \ && export SCWRYPTS_INSTALLATION_TYPE=$(cat "$SCWRYPTS_ROOT__scwrypts/MANAGED_BY") \
|| export SCWRYPTS_INSTALLATION_TYPE=manual \ || export SCWRYPTS_INSTALLATION_TYPE=manual \
; ;
export SCWRYPTS_ROOT__scwrypts="$SCWRYPTS_ROOT"
##################################################################### #####################################################################