Tuning gws script
Work correctly with modules
This commit is contained in:
33
bin/gws
33
bin/gws
@@ -16,43 +16,44 @@ StrIter = Iterable[str]
|
||||
GwCommand = 'gw'
|
||||
DEBUG = False
|
||||
|
||||
actions = (
|
||||
'clean',
|
||||
'build',
|
||||
'compileTestKotlin',
|
||||
# todo only if there no -x prefix
|
||||
'test',
|
||||
'componentTest',
|
||||
'shadowJar'
|
||||
)
|
||||
|
||||
shortcuts = {
|
||||
'c': ['clean'],
|
||||
'b': ['build'],
|
||||
't': ['test'],
|
||||
'bt': ['compileTestKotlin'],
|
||||
'ct': ['componentTest'],
|
||||
'tct': ['test', 'componentTest'],
|
||||
'cb': ['clean', 'build'],
|
||||
'cbx': ['clean', 'build', '-x', 'test'],
|
||||
'cbt': ['clean', 'build', 'compileTestKotlin', '-x', 'test'],
|
||||
'ctt': ['cleanComponentTest'],
|
||||
'cct': ['cleanComponentTest'],
|
||||
'rt': ['cleanTest', 'test'],
|
||||
'rct': ['cleanComponentTest', 'componentTest'],
|
||||
'nd': ['-x', 'detekt'],
|
||||
'-nd': ['-x', 'detekt'],
|
||||
'xt': ['-x', 'test'],
|
||||
'-nt': ['-x', 'test'],
|
||||
'br': ['bootRun'],
|
||||
'rb': ['bootRun'],
|
||||
'jar': ['shadowJar'],
|
||||
'-nt': ['-x', 'test'],
|
||||
'-nc': ['--no-build-cache'],
|
||||
'-rr': ['--rerun-tasks'],
|
||||
'-wl': ['--write-locks'],
|
||||
'-rt': ['--rerun-tasks'],
|
||||
'-wl': ['--write-locks'],
|
||||
'-ef': ['-Penvironment=free'],
|
||||
'-el': ['-Penvironment=licensed'],
|
||||
'-lic': ['-Penvironment=licensed']
|
||||
}
|
||||
actions = [
|
||||
'clean',
|
||||
'build',
|
||||
'compileTestKotlin',
|
||||
'test',
|
||||
'componentTest',
|
||||
'shadowJar'
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
help_text = """\
|
||||
Support functionality for gw application
|
||||
@@ -111,12 +112,12 @@ def split_on_condition(lst: Sequence, condtion):
|
||||
|
||||
|
||||
def pair_module_with_action(args: Args) -> List[str]:
|
||||
modules, no_module = split_on_condition(args, is_module)
|
||||
modules, rest_args = split_on_condition(args, is_module)
|
||||
log("modules", modules)
|
||||
log("args", no_module)
|
||||
log("args", rest_args)
|
||||
if modules:
|
||||
_args = []
|
||||
for arg in no_module:
|
||||
for arg in rest_args:
|
||||
if arg in actions:
|
||||
for module in modules:
|
||||
_args.append(module + ':' + arg)
|
||||
|
||||
Reference in New Issue
Block a user