[mod] tools:build
This commit is contained in:
parent
31df9cfbaf
commit
01221f0374
1 changed files with 30 additions and 13 deletions
19
tools/build
19
tools/build
|
@ -18,6 +18,7 @@ def main():
|
||||||
type = str,
|
type = str,
|
||||||
dest = "revision",
|
dest = "revision",
|
||||||
default = None,
|
default = None,
|
||||||
|
help = "use '.' for latest",
|
||||||
)
|
)
|
||||||
argument_parser.add_argument(
|
argument_parser.add_argument(
|
||||||
"-f",
|
"-f",
|
||||||
|
@ -37,9 +38,25 @@ def main():
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
revision = (args.revision or revisions[-1])
|
revision = (
|
||||||
|
args.revision
|
||||||
|
if
|
||||||
|
(
|
||||||
|
(not (args.revision is None))
|
||||||
|
and
|
||||||
|
(not (args.revision == ""))
|
||||||
|
and
|
||||||
|
(not (args.revision == "."))
|
||||||
|
)
|
||||||
|
else
|
||||||
|
revisions[-1]
|
||||||
|
)
|
||||||
|
|
||||||
## exec
|
## exec
|
||||||
|
if (not (revision in set(revisions))):
|
||||||
|
_sys.stderr.write("-- invalid revision: %s\n" % revision)
|
||||||
|
_sys.exit(1)
|
||||||
|
else:
|
||||||
_sys.stderr.write("-- data\n")
|
_sys.stderr.write("-- data\n")
|
||||||
_os.system(
|
_os.system(
|
||||||
"cat %s/structure/%s.sindri.json | tools/sindri/sindri --format='database:%s'"
|
"cat %s/structure/%s.sindri.json | tools/sindri/sindri --format='database:%s'"
|
||||||
|
|
Loading…
Add table
Reference in a new issue