Revision 7fc29bde
Added by koszko over 1 year ago
src/hydrilla/builder/__main__.py | ||
---|---|---|
31 | 31 |
from .build import Build |
32 | 32 |
|
33 | 33 |
dir_type = click.Path(exists=True, file_okay=False, resolve_path=True) |
34 |
index_type = click.Path(path_type=Path) |
|
35 | 34 |
|
36 | 35 |
@click.command() |
37 | 36 |
@click.option('-s', '--srcdir', default='./', type=dir_type, show_default=True, |
38 | 37 |
help='Source directory to build from.') |
39 |
@click.option('-i', '--index-json', default='index.json', type=index_type,
|
|
38 |
@click.option('-i', '--index-json', default='index.json', type=click.Path(),
|
|
40 | 39 |
help='Path to file to be processed instead of index.json (if not absolute, resolved relative to srcdir).') |
41 | 40 |
@click.option('-d', '--dstdir', type=dir_type, required=True, |
42 | 41 |
help='Destination directory to write built package files to.') |
... | ... | |
45 | 44 |
Build Hydrilla package from scrdir and write the resulting files under |
46 | 45 |
dstdir. |
47 | 46 |
""" |
48 |
build = Build(Path(srcdir), Path(index_json.decode()))
|
|
47 |
build = Build(Path(srcdir), Path(index_json)) |
|
49 | 48 |
build.write_package_files(Path(dstdir)) |
50 | 49 |
|
51 | 50 |
preform_build() |
Also available in: Unified diff
fix handling of --index-json option