git-rev-label 2.24.22 → 2.26.24

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.
Files changed (2) hide show
  1. package/git-rev-label +9 -9
  2. 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-c24-gd8537d1-b22
25
- VERSION_NPM=2.24.22
24
+ VERSION=master-c26-g033348f-b24
25
+ VERSION_NPM=2.26.24
26
26
 
27
27
  ## todo maybe use utils.bash from autorsync
28
28
  function echomsg { echo $'\e[1;37m'"$@"$'\e[0m'; }
@@ -281,6 +281,12 @@ resolve_dependancies(){
281
281
  }
282
282
  space_newline(){ sed -E 's, +,\n,g' ;}
283
283
 
284
+ # shellcheck disable=SC2034 ## shellcheck cannot track variables usage because they are referenced individually
285
+ variables_always_calculated(){
286
+ branch="$(git rev-parse --abbrev-ref HEAD | sed s,^HEAD$,DETACHED,)"
287
+ tag="$(git tag --list --points-at HEAD | head -1)" || true
288
+ refname=${branch/^DETACHED$/${tag:-DETACHED}}
289
+ }
284
290
  # shellcheck disable=SC2034 ## shellcheck cannot track variables usage because they are referenced individually
285
291
  variables(){
286
292
  commit=$(git rev-parse --short HEAD)
@@ -295,13 +301,7 @@ variables(){
295
301
  DIRTY=${dirty^^}
296
302
  _DIRTY=${_dirty^^}
297
303
  branch="$(git rev-parse --abbrev-ref HEAD | sed s,^HEAD$,DETACHED,)"
298
- tag="$(git tag --list --points-at HEAD | head -1)"
299
- refname=${branch/^DETACHED$/${tag:-DETACHED}}
300
- }
301
- # shellcheck disable=SC2034 ## shellcheck cannot track variables usage because they are referenced individually
302
- variables_always_calculated(){
303
- branch="$(git rev-parse --abbrev-ref HEAD | sed s,^HEAD$,DETACHED,)"
304
- tag="$(git tag --list --points-at HEAD | head -1)"
304
+ tag="$(git tag --list --points-at HEAD | head -1)" || true
305
305
  refname=${branch/^DETACHED$/${tag:-DETACHED}}
306
306
  }
307
307
  get_function_body(){
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "git-rev-label",
3
3
  "description": "Obtain information about Git repository revision in format like 'master-c73-gbbb6bec'",
4
- "version":"2.24.22",
4
+ "version":"2.26.24",
5
5
  "homepage": "https://gitlab.com/kyb/git-rev-label",
6
6
  "keywords": [
7
7
  "git",