Skip to content

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

+7
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)