Merge branch 'master' of square-r00t.net:bdisk
This commit is contained in:
commit
ef8562fb0e
@ -95,12 +95,17 @@ def parseConfig(confs):
|
|||||||
# commits on top of a new tagged release). e.g. for build Y:
|
# commits on top of a new tagged release). e.g. for build Y:
|
||||||
# v#.##-Y or v#.##rX-Y
|
# v#.##-Y or v#.##rX-Y
|
||||||
if config_dict['bdisk']['ver'] == '':
|
if config_dict['bdisk']['ver'] == '':
|
||||||
repo = git.Repo(config_dict['build']['basedir'])
|
try:
|
||||||
refs = repo.git.describe(repo.head.commit).split('-')
|
repo = git.Repo(config_dict['build']['basedir'])
|
||||||
if len(refs) >= 2:
|
refs = repo.git.describe(repo.head.commit).split('-')
|
||||||
config_dict['bdisk']['ver'] = refs[0] + 'r' + refs[1]
|
if len(refs) >= 2:
|
||||||
else:
|
config_dict['bdisk']['ver'] = refs[0] + 'r' + refs[1]
|
||||||
config_dict['bdisk']['ver'] = refs[0]
|
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.
|
# And the build number.
|
||||||
# TODO: support tracking builds per version. i.e. in buildnum:
|
# TODO: support tracking builds per version. i.e. in buildnum:
|
||||||
# v2.51r13:0
|
# 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/build.ini`
|
||||||
* `/opt/dev/bdisk/extra/build.ini`
|
* `/opt/dev/bdisk/extra/build.ini`
|
||||||
* `/opt/dev/bdisk/extra/dist.build.ini`
|
* `/opt/dev/bdisk/extra/dist.build.ini`
|
||||||
|
* `<bdisk.py directory>/../build.ini`
|
||||||
|
|
||||||
We'll go into more detail for each section below.
|
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
|
prepdir = ${dlpath}/temp
|
||||||
archboot = ${prepdir}/${bdisk:name}
|
archboot = ${prepdir}/${bdisk:name}
|
||||||
mountpt = /mnt/${bdisk:uxname}
|
mountpt = /mnt/${bdisk:uxname}
|
||||||
multiarch = yes
|
multiarch = x86_64
|
||||||
sign = yes
|
sign = yes
|
||||||
ipxe = no
|
ipxe = no
|
||||||
i_am_a_racecar = 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
|
. ASCII only
|
||||||
|
|
||||||
==== `ver`
|
==== `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
|
. No whitespace
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user