Browse Source

Move PRERELEASE to mkit.ini

Alois Mahdal 9 years ago
parent
commit
231e822f38
3 changed files with 6 additions and 7 deletions
  1. 5
    5
      src/include/build.sh
  2. 1
    1
      src/include/release.sh
  3. 0
    1
      src/mkit.mk

+ 5
- 5
src/include/build.sh View File

@@ -172,7 +172,7 @@ get_version() {
172 172
     #
173 173
     #  1. use VERSION (from config.mk)
174 174
     #  2. if we are in git, override the version with last tag
175
-    #  3. if set, add PRERELEASE (from config.mk) as pre-release ID
175
+    #  3. if set, add project:prerl (from mkit.ini) as pre-release ID
176 176
     #     (afer dash)
177 177
     #  4. if we are at a later commit than the last tag, add branch
178 178
     #     name and commit sha1 to build metadata (after plus sign)
@@ -184,7 +184,7 @@ get_version() {
184 184
     # Examples:
185 185
     #
186 186
     #     myprog v1.0.7                         # all clear
187
-    #     myprog v1.0.7-alpha                   # PRERELEASE="alpha"
187
+    #     myprog v1.0.7-alpha                   # mkit.ini: project:prerl="alpha"
188 188
     #     myprog v1.0.7-alpha+g1aef811.master   # ^^ + some commits after
189 189
     #     myprog v1.0.7-alpha+gf14fc4f.api2     # ^^ + on a feature branch
190 190
     #     myprog v1.0.7-alpha+gf14fc4f.api2.dirty  # ^^ + tree edited
@@ -205,12 +205,12 @@ get_version() {
205 205
     # meta-data is to *identify* the code, and provide safe path back
206 206
     # to tree; commit refs are already perfect for that.
207 207
     #
208
-    # FIXME:  Using PRERELEASE for release IDs may not be compatible with
208
+    # FIXME:  Using project:prerl for release IDs may not be compatible with
209 209
     #         release strategy implemented in release.sh
210 210
     #
211 211
     local version=$VERSION
212
-    local prerl=$PRERELEASE
213
-    grep ":" <<<"$prerl" && warn "colon in PRERELEASE may corrupt version data: $prerl"
212
+    local prerl=$(ini 1value project:prerl)
213
+    grep ":" <<<"$prerl" && warn "colon in project:prerl may corrupt version data: $prerl"
214 214
     if git rev-parse HEAD >&/dev/null;
215 215
     then    # we are in git repo... so we can get smart
216 216
         local latest_tag=$(

+ 1
- 1
src/include/release.sh View File

@@ -95,7 +95,7 @@ __release() {
95 95
     # Span release routines: make a signed tag, check branch
96 96
     # and update release branch
97 97
     #
98
-    # FIXME: Using PRERELEASE as build.sh:get_version() does may not be
98
+    # FIXME: Using project:prerl as build.sh:get_version() does may not be
99 99
     #        compatible with this release strategy
100 100
     #
101 101
     local level=$1

+ 0
- 1
src/mkit.mk View File

@@ -8,7 +8,6 @@ all: options build
8 8
 options:
9 9
 	@echo build options:
10 10
 	@echo "VERSION  = ${VERSION}"
11
-	@echo "PRERELEASE = ${PRERELEASE}"
12 11
 	@echo "DESTDIR   = ${DESTDIR}"
13 12
 	@echo "PREFIX   = ${PREFIX}"
14 13