Skip to content

Commit 91f05a1

Browse files
committed
Copy author date and times from parent
1 parent ea74353 commit 91f05a1

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The branches here should be considered a temporary solution until the official o
2020

2121
A common feature suggestion for comma.ai's openpilot is to have a selectable vehicle selector in the settings if a vehicle is unrecognized. This is a temporary out-of-openpilot-codebase solution until such functionality is implemented and present.
2222

23-
You can see a list of fingerprint models, their corresponding branches, and their corresponding URLs for the [URL installer](https://github.com/commaai/openpilot/wiki/Forks#url-installers-at-installation-screen) here:
23+
You can see a list of fingerprint models, their corresponding installer URLs for the [URL installer](https://github.com/commaai/openpilot/wiki/Forks#url-installers-at-installation-screen), and a link to a GitHub view of the branches here:
2424

2525
https://hardcoded-fp.github.io/openpilot/
2626

generate.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,16 @@ def generate_branch(base, car):
110110
# Append 'export FINGERPRINT="car name"' to the end of launch_env.sh
111111
os.system(f"echo 'export FINGERPRINT=\"{car}\"' >> comma_openpilot/launch_env.sh")
112112
# Commit the changes
113+
# Get date of current commit
114+
commit_date = os.popen(
115+
"cd comma_openpilot && git log -1 --format=%cd --date=iso-strict"
116+
).read()
117+
author_date = os.popen(
118+
"cd comma_openpilot && git log -1 --format=%ad --date=iso-strict"
119+
).read()
120+
113121
os.system(
114-
f"cd comma_openpilot && git add launch_env.sh && GIT_AUTHOR_DATE='Fri Jul 29 00:00:00 2023 -0700' GIT_COMMITTER_DATE='Fri Jul 29 00:00:00 2023 -0700' git commit -m 'Hardcode fingerprint for {car}'"
122+
f"cd comma_openpilot && git add launch_env.sh && GIT_AUTHOR_DATE='{author_date}' GIT_COMMITTER_DATE='{commit_date}' git commit -m 'Hardcode fingerprint for {car}'"
115123
)
116124
return branch_name
117125

@@ -151,6 +159,7 @@ def generate_html(base_cars_base_branches):
151159
body += f"<li><code>{car}</code>"
152160
body += f"<ul>"
153161
body += f"<li>Custom Software URL: <code>https://installer.comma.ai/hardcoded-fp/{base_cars_base_branches[base][car]}</code></li>"
162+
body += f"<li><a href=\"https://github.com/hardcoded-fp/openpilot/tree/{base_cars_base_branches[base][car]}\">View on GitHub</a></li>"
154163
body += f"</ul>"
155164
body += f"</li>"
156165

0 commit comments

Comments
 (0)