|
@@ -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=$(
|