git-rev-label 2.24.23 → 2.27.25
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/README.md +9 -0
- package/git-rev-label +9 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -124,3 +124,12 @@ This is super useful when you want store some information about current build in
|
|
|
124
124
|
|
|
125
125
|
Shell script creates `build_info.h` C header file with information about repository: branch, tags, timestamps, etc.
|
|
126
126
|
Include this header to access build information from code.
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
-------------------------
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
## ToDo
|
|
133
|
+
- move to dedicated project group gitlab.com/git-rev-label
|
|
134
|
+
- move artifacts/* branches family to dedicated repo gitlab.com/git-rev-label/releases
|
|
135
|
+
- use also releases page of main development repo, keep it in sync with releases-repo
|
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-c27-g1eb4c9d-b25
|
|
25
|
+
VERSION_NPM=2.27.25
|
|
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