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
     #
172
     #
173
     #  1. use VERSION (from config.mk)
173
     #  1. use VERSION (from config.mk)
174
     #  2. if we are in git, override the version with last tag
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
     #     (afer dash)
176
     #     (afer dash)
177
     #  4. if we are at a later commit than the last tag, add branch
177
     #  4. if we are at a later commit than the last tag, add branch
178
     #     name and commit sha1 to build metadata (after plus sign)
178
     #     name and commit sha1 to build metadata (after plus sign)
184
     # Examples:
184
     # Examples:
185
     #
185
     #
186
     #     myprog v1.0.7                         # all clear
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
     #     myprog v1.0.7-alpha+g1aef811.master   # ^^ + some commits after
188
     #     myprog v1.0.7-alpha+g1aef811.master   # ^^ + some commits after
189
     #     myprog v1.0.7-alpha+gf14fc4f.api2     # ^^ + on a feature branch
189
     #     myprog v1.0.7-alpha+gf14fc4f.api2     # ^^ + on a feature branch
190
     #     myprog v1.0.7-alpha+gf14fc4f.api2.dirty  # ^^ + tree edited
190
     #     myprog v1.0.7-alpha+gf14fc4f.api2.dirty  # ^^ + tree edited
205
     # meta-data is to *identify* the code, and provide safe path back
205
     # meta-data is to *identify* the code, and provide safe path back
206
     # to tree; commit refs are already perfect for that.
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
     #         release strategy implemented in release.sh
209
     #         release strategy implemented in release.sh
210
     #
210
     #
211
     local version=$VERSION
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
     if git rev-parse HEAD >&/dev/null;
214
     if git rev-parse HEAD >&/dev/null;
215
     then    # we are in git repo... so we can get smart
215
     then    # we are in git repo... so we can get smart
216
         local latest_tag=$(
216
         local latest_tag=$(

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

95
     # Span release routines: make a signed tag, check branch
95
     # Span release routines: make a signed tag, check branch
96
     # and update release branch
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
     #        compatible with this release strategy
99
     #        compatible with this release strategy
100
     #
100
     #
101
     local level=$1
101
     local level=$1

+ 0
- 1
src/mkit.mk View File

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