Compare commits

...

2 Commits

Author SHA1 Message Date
c6f150f6d5
LAMINAR_REASON - make it oneline
Signed-off-by: Václav Valíček <valicek1994@gmail.com>
2022-08-10 08:59:37 +02:00
7d1b542963
Try running executor with LAMINAR_REASON
Signed-off-by: Václav Valíček <valicek1994@gmail.com>
2022-08-10 08:56:25 +02:00

View File

@ -42,7 +42,17 @@ def detector_executor(commit: DetectedCommit):
for key, val in env.items():
arg_list.append(f"COMMIT_{key.upper()}={val}")
subprocess.run(arg_list)
reason = commit.abbrev
if commit.is_branch:
reason += f"/{commit.branches}"
if commit.is_tag:
reason += f" tags: {commit.tags}"
reason = f"[{reason}] " + commit.log.splitlines()[0]
env = os.environ.copy()
env['LAMINAR_REASON'] = reason
subprocess.run(arg_list, env = env)
def clone_or_fetch(base_dir: str, clone_init: bool = False, detector_init: bool = False):
@ -107,7 +117,8 @@ def main() -> int:
parser.add_argument('--base-dir', help = 'path to directory containing whole cloner structure', required = True,
default = None, type = str)
parser.add_argument('--debug', '-d', help = "enable debug output", action = 'store_true')
parser.add_argument('--colored', help = "enable colored log output even tty() is not detected", action = "store_true")
parser.add_argument('--colored', help = "enable colored log output even tty() is not detected",
action = "store_true")
args = parser.parse_args()
if args.debug:
log.setLevel(logging.DEBUG)