Skip to content

Commit

Permalink
fix version.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
gwhiteCL committed Sep 17, 2024
1 parent 1c0cfbb commit 41f1d91
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions experiments/initial/run-l4s-wifi.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@
command_get_repo_time = "git rev-parse --abbrev-ref HEAD"
command_get_repo_commit = "git rev-parse --short HEAD"

branch_output = subprocess.check_output(["git", "branch", "-vvv"])
branch_output = subprocess.check_output(["git", "branch", "-vv"])
with open("version.txt", "w") as out:
command_output = branch_output.decode("utf-8").strip()
command_output.split("\n")[0:1]
command_output = branch_output.decode("utf-8").split("\n")
branch_status = next((s for s in command_output if s.startswith('*')), None)
out.write(
"# Branch name commit hash commit message\n"
)
out.write("".join(command_output.split("\n")[0:1]))
out.write(branch_status)
out.close()

diff_output = subprocess.check_output(["git", "diff"])
Expand Down
8 changes: 4 additions & 4 deletions experiments/multiprocess/run_l4s_wifi.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ def runNS3Simulation(run_filepath, arguments, plotTitle):
command_get_repo_time = "git rev-parse --abbrev-ref HEAD"
command_get_repo_commit = "git rev-parse --short HEAD"

branch_output = subprocess.check_output(["git", "branch", "-vvv"])
branch_output = subprocess.check_output(["git", "branch", "-vv"])
with open(resultsDir + "/" + "version.txt", "w") as out:
command_output = branch_output.decode("utf-8").strip()
command_output.split("\n")[0:1]
command_output = branch_output.decode("utf-8").split("\n")
branch_status = next((s for s in command_output if s.startswith('*')), None)
out.write(
"# Branch name commit hash commit message\n"
)
out.write("".join(command_output.split("\n")[0:1]))
out.write(branch_status)
out.close()

diff_output = subprocess.check_output(["git", "diff"])
Expand Down
8 changes: 4 additions & 4 deletions experiments/multiprocess/run_l4s_wifi_long.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ def runNS3Simulation(run_filepath, arguments, plotTitle):
command_get_repo_time = "git rev-parse --abbrev-ref HEAD"
command_get_repo_commit = "git rev-parse --short HEAD"

branch_output = subprocess.check_output(["git", "branch", "-vvv"])
branch_output = subprocess.check_output(["git", "branch", "-vv"])
with open(resultsDir + "/" + "version.txt", "w") as out:
command_output = branch_output.decode("utf-8").strip()
command_output.split("\n")[0:1]
command_output = branch_output.decode("utf-8").split("\n")
branch_status = next((s for s in command_output if s.startswith('*')), None)
out.write(
"# Branch name commit hash commit message\n"
)
out.write("".join(command_output.split("\n")[0:1]))
out.write(branch_status)
out.close()

diff_output = subprocess.check_output(["git", "diff"])
Expand Down

0 comments on commit 41f1d91

Please sign in to comment.