|
13 | 13 | FLAG_RELEASE = "release" |
14 | 14 | FLAG_VERSION = "version" |
15 | 15 | FLAG_CHECK = "check" |
| 16 | +FLAG_RUN = "run" |
16 | 17 | FLAG_SKIP_PATH = "skip_path" |
17 | 18 | FLAG_FORCE = "force" |
18 | 19 | FLAG_DOCKER_IMAGE_PREFIX = "docker_image_prefix" |
@@ -288,7 +289,9 @@ def _get_current_branch() -> Tuple[str, str]: |
288 | 289 | Returns: |
289 | 290 | Tuple: (branchname, type) |
290 | 291 | """ |
291 | | - full_branch_name = run("git branch --show-current").stdout.rstrip("\n") |
| 292 | + full_branch_name = run( |
| 293 | + "git branch --show-current", disable_stdout_logging=True |
| 294 | + ).stdout.rstrip("\n") |
292 | 295 | if full_branch_name == "": |
293 | 296 | full_branch_name = "HEAD" |
294 | 297 | path_parts = full_branch_name.split("/") |
@@ -337,6 +340,11 @@ def _get_default_cli_arguments_parser( |
337 | 340 | help="Release all artefacts to respective remote registries (e.g. DockerHub)", |
338 | 341 | action="store_true", |
339 | 342 | ) |
| 343 | + parser.add_argument( |
| 344 | + f"--{FLAG_RUN}", |
| 345 | + help="Run the component for development (e.g. dev server).", |
| 346 | + action="store_true", |
| 347 | + ) |
340 | 348 | parser.add_argument( |
341 | 349 | f"--{FLAG_VERSION}", help="Version of build (MAJOR.MINOR.PATCH-TAG)" |
342 | 350 | ) |
@@ -383,10 +391,10 @@ def _is_valid_command_combination(args: argparse.Namespace) -> bool: |
383 | 391 | ) |
384 | 392 | return False |
385 | 393 | if args.release and not args.test and not args.force: |
386 | | - log(f"Test must be executed before the deployment (--{FLAG_TEST})") |
| 394 | + log(f"The release steps requires test to be executed (--{FLAG_TEST})") |
387 | 395 | return False |
388 | 396 | if args.release and not args.make and not args.force: |
389 | | - log(f"Build must be executed before the deployment (--{FLAG_MAKE})") |
| 397 | + log(f"The release steps requires make to be executed (--{FLAG_MAKE})") |
390 | 398 | return False |
391 | 399 |
|
392 | 400 | if args.release: |
@@ -428,7 +436,6 @@ def _get_latest_branch_version(branch_name: str = "") -> Optional["Version"]: |
428 | 436 |
|
429 | 437 | def _is_dev_tag_belonging_to_branch(version: "Version", branch_name: str = "") -> bool: |
430 | 438 | # The found dev-version does not belong to the current branch |
431 | | - print(version.to_string(), _get_dev_suffix(branch_name)) |
432 | 439 | return not ( |
433 | 440 | branch_name |
434 | 441 | and version |
|
0 commit comments