Skip to content
Snippets Groups Projects

Convert to a package

Merged Ashwin Kumar Karnad requested to merge convert-to-a-package into main
5 files
+ 36
27
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -599,24 +599,28 @@ def record_script_execution_summary(
@@ -599,24 +599,28 @@ def record_script_execution_summary(
cmd_line = " ".join(sys.argv)
cmd_line = " ".join(sys.argv)
# script branch and commit hash
# script branch and commit hash
with os_chdir(root_dir):
with os_chdir(root_dir):
script_branch = (
try:
run(
script_branch = (
["git", "rev-parse", "--abbrev-ref", "HEAD"],
run(
stdout=subprocess.PIPE,
["git", "rev-parse", "--abbrev-ref", "HEAD"],
check=True,
stdout=subprocess.PIPE,
 
check=True,
 
)
 
.stdout.decode()
 
.strip()
)
)
.stdout.decode()
script_commit_hash = (
.strip()
run(
)
["git", "rev-parse", "--short", "HEAD"],
script_commit_hash = (
stdout=subprocess.PIPE,
run(
check=True,
["git", "rev-parse", "--short", "HEAD"],
)
stdout=subprocess.PIPE,
.stdout.decode()
check=True,
.strip()
)
)
.stdout.decode()
except subprocess.CalledProcessError:
.strip()
script_branch = "unknown"
)
script_commit_hash = "unknown"
# spack-environments branch and commit hash from kwargs
# spack-environments branch and commit hash from kwargs
spe_branch = kwargs.get("spe_branch", None)
spe_branch = kwargs.get("spe_branch", None)
spe_commit_hash = kwargs.get("spe_commit_hash", None)
spe_commit_hash = kwargs.get("spe_commit_hash", None)
@@ -1189,8 +1193,8 @@ def main():
@@ -1189,8 +1193,8 @@ def main():
# Carry out the action
# Carry out the action
args = parser.parse_args()
args = parser.parse_args()
# target dir is the place where this script exists. the
# root dir is the place where this script is called from
root_dir = Path(os.path.dirname(os.path.realpath(__file__)))
root_dir = Path(os.getcwd())
set_up_logging(
set_up_logging(
args.loglevel,
args.loglevel,
Loading