diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-03-17 19:49:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 19:49:52 +0100 |
commit | dedb464654e14dd94f915cd381b820fe7605eba5 (patch) | |
tree | 4c3a8b233e702beb6f06bea704cf54444e71260c | |
parent | 34c969793be57543c02c4d16153098ab5e0b0922 (diff) | |
parent | 1635b91a95598919fcb97bd9cbcc8b06203ac40a (diff) | |
download | vyos-build-dedb464654e14dd94f915cd381b820fe7605eba5.tar.gz vyos-build-dedb464654e14dd94f915cd381b820fe7605eba5.zip |
Merge pull request #220 from dmbaturin/T4306-1.3.0
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 e35dfd8b..cae54f4a 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 |