Skip to content

Commit 534b824

Browse files
author
Mohannad Farrag
committed
Automatically update timestamp for BUILD_DATE
* Instead of manually updating the timestamp whenever we run gn2bp, this will always update the timestamp everytime Cronet is compiled. Bug: 332528730 Test: m cronet_aml_base_build_date Change-Id: I6b91cd4cfab97044f18aa6837717c5b75cacd1fc
1 parent ec5fd40 commit 534b824

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Android.bp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
//
15-
// This file is automatically generated by gen_android_bp. Do not edit.
15+
// This file is automatically generated by gn2bp/gen_android_bp. Do not edit.
1616

1717
build = ["Android.extras.bp"]
1818

@@ -5839,7 +5839,7 @@ cc_library_static {
58395839
cc_genrule {
58405840
name: "cronet_aml_base_build_date",
58415841
cmd: "mkdir -p $(genDir)/base && $(location base/write_build_date_header.py) $(out) " +
5842-
"1712072430",
5842+
"`date +%s`",
58435843
out: [
58445844
"base/generated_build_date.h",
58455845
],
@@ -5855,7 +5855,7 @@ cc_genrule {
58555855
cc_genrule {
58565856
name: "cronet_aml_base_build_date__testing",
58575857
cmd: "mkdir -p $(genDir)/base && $(location base/write_build_date_header.py) $(out) " +
5858-
"1712072430",
5858+
"`date +%s`",
58595859
host_supported: true,
58605860
out: [
58615861
"base/generated_build_date.h",

android/tools/gn2bp/Android.bp.swp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414
//
15-
// This file is automatically generated by gen_android_bp. Do not edit.
15+
// This file is automatically generated by gn2bp/gen_android_bp. Do not edit.
1616

1717
build = ["Android.extras.bp"]
1818

@@ -5839,7 +5839,7 @@ cc_library_static {
58395839
cc_genrule {
58405840
name: "cronet_aml_base_build_date",
58415841
cmd: "mkdir -p $(genDir)/base && $(location base/write_build_date_header.py) $(out) " +
5842-
"1705445157",
5842+
"`date +%s`",
58435843
out: [
58445844
"base/generated_build_date.h",
58455845
],
@@ -5855,7 +5855,7 @@ cc_genrule {
58555855
cc_genrule {
58565856
name: "cronet_aml_base_build_date__testing",
58575857
cmd: "mkdir -p $(genDir)/base && $(location base/write_build_date_header.py) $(out) " +
5858-
"1705445157",
5858+
"`date +%s`",
58595859
host_supported: true,
58605860
out: [
58615861
"base/generated_build_date.h",

android/tools/gn2bp/gen_android_bp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,7 @@ class BaseActionSanitizer():
11631163
class WriteBuildDateHeaderSanitizer(BaseActionSanitizer):
11641164
def _sanitize_args(self):
11651165
self._set_arg_at(0, '$(out)')
1166+
self._set_arg_at(1, '`date +%s`')
11661167
super()._sanitize_args()
11671168

11681169
class WriteBuildFlagHeaderSanitizer(BaseActionSanitizer):

0 commit comments

Comments
 (0)