diff --git a/build/dotfile_settings.gni b/build/dotfile_settings.gni index 50c04a8c0caa301ff1b24c34dc5824fb2ed9d7f7..974ef4c50ddc3f3636f835c53a2f0faa9baa91e4 100644 --- a/build/dotfile_settings.gni +++ b/build/dotfile_settings.gni @@ -39,5 +39,6 @@ build_dotfile_settings = { "//build/toolchain/win/win_toolchain_data.gni", "//build/toolchain/zos/BUILD.gn", "//build/util/branding.gni", + "//build/util/lastchange.gni", # ohos add to generate last change when build ] } diff --git a/build/util/lastchange.gni b/build/util/lastchange.gni index 909b9789ff73f355f099b6acf7096be9378bef84..7e97b2cd3e5451edae5476ae2c92a616aa749006 100644 --- a/build/util/lastchange.gni +++ b/build/util/lastchange.gni @@ -14,3 +14,11 @@ if (use_dummy_lastchange) { } else { lastchange_file = "//build/util/LASTCHANGE" } + +if (is_ohos) { + exec_script("lastchange.py", + [ + "-o", + rebase_path(lastchange_file), + ]) +} diff --git a/build/util/lastchange.py b/build/util/lastchange.py index 98a6360b46872dbadb53aa5c832419c6f804fce5..a25a7ffb99794142407a10d853235865b0c15205 100755 --- a/build/util/lastchange.py +++ b/build/util/lastchange.py @@ -256,7 +256,9 @@ def main(argv=None): help=("Only use log entries where the commit message " "matches the supplied filter regex. Defaults to " "'^Change-Id:' to suppress local commits."), - default='^Change-Id:') + # IS_OHOS + # default='^Change-Id:') + default='') args, extras = parser.parse_known_args(argv[1:])