Sfoglia il codice sorgente

Cache semver() output in .mkit/semver

Alois Mahdal 7 anni fa
parent
commit
982ef8cb31
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2
    0
      src/include/facts.sh

+ 2
- 0
src/include/facts.sh Vedi File

@@ -154,6 +154,7 @@ semver() {
154 154
     local commit        # commit indicator (CURRENT_BRANCH.gHASH)
155 155
     local dirty         # 0 if dirty, 1 if clean
156 156
     local suffix        # version suffix
157
+    local_get semver && return 0
157 158
     version=$(ini 1value project:version)
158 159
     prerl=$(ini 1value project:prerl)
159 160
     grep ":" <<<"$prerl" \
@@ -178,5 +179,6 @@ semver() {
178 179
         test -n "$prerl" && suffix="-$prerl$suffix"
179 180
         version="$version$suffix"
180 181
     fi
182
+    local_putb semver <<<"$version"
181 183
     echo "$version"
182 184
 }