because sometimes people don't read/grok docs
This commit is contained in:
parent
6760b46c5d
commit
f9c44ecc8e
@ -93,12 +93,17 @@ def parseConfig(confs):
|
||||
# commits on top of a new tagged release). e.g. for build Y:
|
||||
# v#.##-Y or v#.##rX-Y
|
||||
if config_dict['bdisk']['ver'] == '':
|
||||
repo = git.Repo(config_dict['build']['basedir'])
|
||||
refs = repo.git.describe(repo.head.commit).split('-')
|
||||
if len(refs) >= 2:
|
||||
config_dict['bdisk']['ver'] = refs[0] + 'r' + refs[1]
|
||||
else:
|
||||
config_dict['bdisk']['ver'] = refs[0]
|
||||
try:
|
||||
repo = git.Repo(config_dict['build']['basedir'])
|
||||
refs = repo.git.describe(repo.head.commit).split('-')
|
||||
if len(refs) >= 2:
|
||||
config_dict['bdisk']['ver'] = refs[0] + 'r' + refs[1]
|
||||
else:
|
||||
config_dict['bdisk']['ver'] = refs[0]
|
||||
except:
|
||||
exit(('{0}: ERROR: {1} is NOT a valid git repository, and you did not specify bdisk:ver in your build.ini! ' +
|
||||
'Did you perhaps install from a package manager? Please refer to the documentation.').format(datetime.datetime.now(),
|
||||
config_dict['build']['basedir']))
|
||||
# And the build number.
|
||||
# TODO: support tracking builds per version. i.e. in buildnum:
|
||||
# v2.51r13:0
|
||||
|
@ -16,6 +16,7 @@ If you want to use your own `build.ini` file (and you should!), the following pa
|
||||
* `/opt/dev/bdisk/build.ini`
|
||||
* `/opt/dev/bdisk/extra/build.ini`
|
||||
* `/opt/dev/bdisk/extra/dist.build.ini`
|
||||
* `<bdisk.py directory>/../build.ini`
|
||||
|
||||
We'll go into more detail for each section below.
|
||||
|
||||
@ -64,7 +65,7 @@ We'll go into more detail for each section below.
|
||||
prepdir = ${dlpath}/temp
|
||||
archboot = ${prepdir}/${bdisk:name}
|
||||
mountpt = /mnt/${bdisk:uxname}
|
||||
multiarch = yes
|
||||
multiarch = x86_64
|
||||
sign = yes
|
||||
ipxe = no
|
||||
i_am_a_racecar = no
|
||||
@ -126,7 +127,7 @@ This string is used for "pretty-printing" of the project name; it should be a mo
|
||||
. ASCII only
|
||||
|
||||
==== `ver`
|
||||
The version string. If this isn't specified, we'll try to guess based on the current git commit and tags in `<<code_basedir_code,build:basedir>>`.
|
||||
The version string. If this isn't specified, we'll try to guess based on the current git commit and tags in `<<code_basedir_code,build:basedir>>`. If `<<code_basedir_code,build:basedir>>` is *not* a git repository (i.e. you installed BDisk from a package manager), you MUST specify a version number.
|
||||
|
||||
. No whitespace
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user