diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-03-17 19:46:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 19:46:25 +0100 |
commit | 72c15abf117804e9b4eac8ec5a3bd6d92e55a3bd (patch) | |
tree | 72172aef5767eaf156a3e3caa58cc54dba02b2b4 | |
parent | d21e0cade82e67965d48b5973d7464f37325cce3 (diff) | |
parent | 17d1e92040be20a3794b918653bc6c8b68da8de0 (diff) | |
download | vyos-build-72c15abf117804e9b4eac8ec5a3bd6d92e55a3bd.tar.gz vyos-build-72c15abf117804e9b4eac8ec5a3bd6d92e55a3bd.zip |
Merge pull request #219 from dmbaturin/T4306
T4306: do not perform a dirtiness check for release builds
-rwxr-xr-x | scripts/make-version-file | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/make-version-file b/scripts/make-version-file index 04e27c44..e6d327ab 100755 --- a/scripts/make-version-file +++ b/scripts/make-version-file @@ -51,9 +51,12 @@ try: # Retrieve the Git commit ID of the repository, 14 charaters will be sufficient build_git = repo.head.object.hexsha[:14] - # If somone played around with the source tree and the build is "dirty", mark it - if repo.is_dirty(): - build_git += "-dirty" + # If someone played around with the source tree and the build is "dirty", mark it. + # Release builds can be "ditry by design" (e.g. modified default config) though, + # so the dirtiness check is only applied to development builds. + if build_config["build_type"] == "development": + if repo.is_dirty(): + build_git += "-dirty" # Retrieve git branch name git_branch = repo.active_branch.name |