git-rev-label 2.19.16 → 2.20.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/git-rev-label +11 -6
- package/package.json +1 -1
package/git-rev-label
CHANGED
|
@@ -21,8 +21,8 @@ shopt -s inherit_errexit
|
|
|
21
21
|
shopt -s lastpipe
|
|
22
22
|
shopt -s expand_aliases
|
|
23
23
|
|
|
24
|
-
VERSION=master-
|
|
25
|
-
VERSION_NPM=2.
|
|
24
|
+
VERSION=master-c20-g407149b-b17
|
|
25
|
+
VERSION_NPM=2.20.17
|
|
26
26
|
|
|
27
27
|
## todo maybe use utils.bash from autorsync
|
|
28
28
|
function echomsg { echo $'\e[1;37m'"$@"$'\e[0m'; }
|
|
@@ -312,9 +312,12 @@ requested_variables_to_be_evaluated(){
|
|
|
312
312
|
## Calculate only requested variables: parse $format, detect required vars, then calculate required variables.
|
|
313
313
|
requested_variables=$(echo "$format"| perl -ne '$var="[A-Za-z_][A-Za-z0-9_]+"; print "$1$2 " while m,\$(?:($var)|\{($var)\}),g')
|
|
314
314
|
echodbg requested_variables="$requested_variables"
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
needed_variables=$(
|
|
315
|
+
test -n "$requested_variables" || return
|
|
316
|
+
# shellcheck disable=SC2086 ## shellcheck cannot track variables usage because they are referenced individually
|
|
317
|
+
needed_variables=$(
|
|
318
|
+
grep -Fx -f <(echo "$requested_variables"|resolve_dependancies|space_newline) \
|
|
319
|
+
<(echo $FULL_LIST|space_newline)
|
|
320
|
+
)
|
|
318
321
|
echodbg needed_variables="$needed_variables"
|
|
319
322
|
func_variables_body="$(get_function_body variables)"
|
|
320
323
|
for varname in $needed_variables ;do
|
|
@@ -339,7 +342,9 @@ variables_always_calculated
|
|
|
339
342
|
########################################################
|
|
340
343
|
########## Handle non-maintenance actions ##############
|
|
341
344
|
default_action(){
|
|
342
|
-
|
|
345
|
+
# shellcheck disable=SC2046 ## The quotes would unquote this, we need unquoted expansion
|
|
346
|
+
# shellcheck disable=SC2086 ## Word splitting is intentional in this case
|
|
347
|
+
eval "$(requested_variables_to_be_evaluated)"
|
|
343
348
|
echo "$format" | expand_env_vars
|
|
344
349
|
}
|
|
345
350
|
if ! is_sourced ;then
|
package/package.json
CHANGED