Conditionally use Unix epoch time for build incremental
Incremental version is used in various places to invalidate caches.
Setting BUILD_NUMBER directly causes unnecessary rebuilds due to
environment variable changes, so simply set it to Unix epoch unless
BUILD_NUMBER is explicitly set.
Change-Id: Id590df48ae1b73b63039f185644103d66a4bbbb3
diff --git a/scripts/gen_build_prop.py b/scripts/gen_build_prop.py
index 6dffa03..ac2c6ff 100644
--- a/scripts/gen_build_prop.py
+++ b/scripts/gen_build_prop.py
@@ -121,6 +121,9 @@
config["LineageDesc"] = config["BuildDesc"]
config["LineageDevice"] = config["DeviceName"]
+ if config["BuildNumber"].startswith("eng."):
+ config["BuildNumber"] = config["DateUtc"]
+
override_config(config)
append_additional_system_props(args)