Remove timestamps from api diff files by using labels.

The api diff files contain the timestamp of files which are being
diffed. This results in different diffs getting generated everytime
even if all the APIs are the same.
In order to generate same diffs, timestamps have been removed by
using the label flag while performing the diff operation.

Bug: 238757360
Test: The builds passed and the api diff files does not contain
timestamps.

Change-Id: If894f5a6632542b566eb0657d22d4c4b2f6afa83
This commit is contained in:
Gurpreet Singh
2022-10-21 11:19:12 +00:00
parent 28a0ee3240
commit 71883fca02

View File

@@ -542,7 +542,8 @@ java_sdk_library_import {{
# so disable the pylint check. # so disable the pylint check.
# pylint: disable=subprocess-run-check # pylint: disable=subprocess-run-check
diff = subprocess.run( diff = subprocess.run(
["diff", "-u0", latest_api, extracted_current_api], ["diff", "-u0", latest_api, extracted_current_api, "--label", latest_api, "--label",
extracted_current_api],
capture_output=True).stdout.decode("utf-8") capture_output=True).stdout.decode("utf-8")
file_object.write(diff) file_object.write(diff)