8000 Prevent rewriting Updater_Signing.h if content unchanged (#7627) · esp8266/Arduino@8b8639e · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8b8639e

Browse files
authored
Prevent rewriting Updater_Signing.h if content unchanged (#7627)
1 parent d030080 commit 8b8639e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/signing.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ def main():
7474
outdir = os.path.dirname(args.out)
7575
if not os.path.exists(outdir):
7676
os.makedirs(outdir)
77+
try:
78+
with open(args.out, "r") as inp:
79+
old_val = inp.read()
80+
if old_val == val:
81+
return
82+
except Exception:
83+
pass
7784
with open(args.out, "w") as f:
7885
f.write(val)
7986
return 0

0 commit comments

Comments
 (0)
0