From d5be23b1aa5a078fa81e40252a0544de3e09b288 Mon Sep 17 00:00:00 2001 From: Thomas Benz Date: Mon, 26 Feb 2024 11:20:40 +0100 Subject: [PATCH] fixv4 --- .github/workflows/{gitlab-ci.yml => gitlab-ci.yml.off} | 0 util/deploy.py | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) rename .github/workflows/{gitlab-ci.yml => gitlab-ci.yml.off} (100%) diff --git a/.github/workflows/gitlab-ci.yml b/.github/workflows/gitlab-ci.yml.off similarity index 100% rename from .github/workflows/gitlab-ci.yml rename to .github/workflows/gitlab-ci.yml.off diff --git a/util/deploy.py b/util/deploy.py index 89afa929..ff6209cf 100644 --- a/util/deploy.py +++ b/util/deploy.py @@ -9,6 +9,7 @@ """Deploy script run by ci. Creates a deploy branch which includes generated files.""" import os import time +import sys # Git command fragments CHECK_BRANCH_CMD = 'git rev-parse --verify' @@ -32,13 +33,19 @@ # get current branch info current_branch = os.popen(GET_BRANCH_CMD).read().split('\n')[0] +print(f'Current branch: {current_branch}') current_hash = os.popen(GET_COMMIT_ID_CMD).read().split('\n')[0] +print(f'Current hash: {current_hash}') current_msg = '\n'.join(os.popen(GET_COMMIT_MSG_CMD).read().split('\n')[:-1]) +print(f'Current commit message: \n{current_msg}') # create target branch deploy_branch = f'__deploy__{current_branch}' +print(f'Deploy branch: {deploy_branch}\n\n') last_deploy_hash = os.popen(f'{CHECK_BRANCH_CMD} {deploy_branch}').read() +print(f'Last deploy hash: {last_deploy_hash} (empty if on deploy branch present)') deploy_msg = f'{current_msg}\n-----\n\nDeployed from {current_hash}' +print(f'Deploy commit message:\n{deploy_msg}') # checkout current working branch os.popen(f'{GIT_CHECKOUT_CMD} {current_branch}') @@ -54,7 +61,7 @@ time.sleep(0.5) # merge feature into deploy branch -os.popen(f'{GIT_MERGE_SQUASH_CMD} {ORIGIN}/{current_branch}') +os.popen(f'{GIT_MERGE_SQUASH_CMD} {current_branch}') time.sleep(0.5) # selectively deactivate gitignore to check in generated files