summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ui/build/build.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/ui/build/build.go b/ui/build/build.go
index 9a9eccd7d..03d839237 100644
--- a/ui/build/build.go
+++ b/ui/build/build.go
@@ -21,7 +21,6 @@ import (
"path/filepath"
"sync"
"text/template"
- "time"
"android/soong/ui/metrics"
)
@@ -66,9 +65,12 @@ func SetupOutDir(ctx Context, config Config) {
// (to allow for source control that uses something other than numbers),
// but must be a single word and a valid file name.
//
- // If no BUILD_NUMBER is set, create a useful "I am an engineering build
- // from this date/time" value. Make it start with a non-digit so that
- // anyone trying to parse it as an integer will probably get "0".
+ // If no BUILD_NUMBER is set, create a useful "I am an engineering build"
+ // value. Make it start with a non-digit so that anyone trying to parse
+ // it as an integer will probably get "0". This value used to contain
+ // a timestamp, but now that more dependencies are tracked in order to
+ // reduce the importance of `m installclean`, changing it every build
+ // causes unnecessary rebuilds for local development.
buildNumber, ok := config.environ.Get("BUILD_NUMBER")
if ok {
writeValueIfChanged(ctx, config, config.OutDir(), "file_name_tag.txt", buildNumber)
@@ -77,7 +79,7 @@ func SetupOutDir(ctx Context, config Config) {
if username, ok = config.environ.Get("BUILD_USERNAME"); !ok {
ctx.Fatalln("Missing BUILD_USERNAME")
}
- buildNumber = fmt.Sprintf("eng.%.6s.%s", username, time.Now().Format("20060102.150405" /* YYYYMMDD.HHMMSS */))
+ buildNumber = fmt.Sprintf("eng.%.6s.00000000.000000", username)
writeValueIfChanged(ctx, config, config.OutDir(), "file_name_tag.txt", username)
}
// Write the build number to a file so it can be read back in