Merge "Only write release config files if they've changed" into main am: 7467410787
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3132915 Change-Id: I31ac2ea835e3edc8ab0a7de578c95a4c8520ca2c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -24,6 +24,7 @@ bootstrap_go_package {
|
|||||||
"golang-protobuf-reflect-protoreflect",
|
"golang-protobuf-reflect-protoreflect",
|
||||||
"golang-protobuf-runtime-protoimpl",
|
"golang-protobuf-runtime-protoimpl",
|
||||||
"soong-cmd-release_config-proto",
|
"soong-cmd-release_config-proto",
|
||||||
|
"blueprint-pathtools",
|
||||||
],
|
],
|
||||||
srcs: [
|
srcs: [
|
||||||
"flag_artifact.go",
|
"flag_artifact.go",
|
||||||
|
@@ -25,6 +25,7 @@ import (
|
|||||||
"slices"
|
"slices"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/google/blueprint/pathtools"
|
||||||
"google.golang.org/protobuf/encoding/prototext"
|
"google.golang.org/protobuf/encoding/prototext"
|
||||||
"google.golang.org/protobuf/proto"
|
"google.golang.org/protobuf/proto"
|
||||||
)
|
)
|
||||||
@@ -101,7 +102,7 @@ func WriteFormattedMessage(path, format string, message proto.Message) (err erro
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return os.WriteFile(path, data, 0644)
|
return pathtools.WriteFileIfChanged(path, data, 0644)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read a message from a file.
|
// Read a message from a file.
|
||||||
|
Reference in New Issue
Block a user