Compare commits

..

No commits in common. "master" and "v2022.08.09.2" have entirely different histories.

View File

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