diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-06-21 21:36:20 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-06-22 09:02:44 +0000 |
commit | f3b87fead2d4cb2a790f0709080551e252d5a46c (patch) | |
tree | ad3fd2622d4d7181d860141420e5d9d0b877d182 /build_scripts | |
parent | 87942459a27465439eb85d083545bfe0fddf2ff4 (diff) |
Associate Coin snapshot builds with Coin integration IDs
This change adds a new setup.py option called --package-timestamp
which allows setting the "dev" part of the version number of a
snapshot package.
It also modifies coin_build_instructions.py to set the package
timestamp to the value of the Coin integration ID.
This has a couple of benefits:
1) We can look up the build and test logs of a specific package
on testresults.qt.io.
This can also be looked up for non-snapshot builds, the
"timestamp = Coin integration ID" can also be found in the
generated __init__.py file.
2) All the different platform packages within one integration
will have the same timestamp, which allows pinning snapshot
packages inside a pipenv Pipfile.
3) It's easier to figure out which packages were built as part
of the same Coin integration.
Task-number: PYSIDE-680
Change-Id: Idb2f2d2313cee213a5d742f88b60315a4e505250
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'build_scripts')
-rw-r--r-- | build_scripts/main.py | 5 | ||||
-rw-r--r-- | build_scripts/options.py | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/build_scripts/main.py b/build_scripts/main.py index b424aa8e4..579cfeae3 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -51,6 +51,11 @@ setup_py_path = os.path.join(setup_script_dir, "setup.py") @memoize def get_package_timestamp(): + """ In a Coin CI build the returned timestamp will be the + Coin integration id timestamp. For regular builds it's + just the current timestamp or a user provided one.""" + if OPTION_PACKAGE_TIMESTAMP: + return OPTION_PACKAGE_TIMESTAMP return int(time.time()) @memoize diff --git a/build_scripts/options.py b/build_scripts/options.py index d7174feff..fd8b0718e 100644 --- a/build_scripts/options.py +++ b/build_scripts/options.py @@ -81,3 +81,4 @@ OPTION_VERBOSE_BUILD = has_option("verbose-build") OPTION_SANITIZE_ADDRESS = has_option("sanitize-address") OPTION_SNAPSHOT_BUILD = has_option("snapshot-build") OPTION_LIMITED_API = option_value("limited-api") +OPTION_PACKAGE_TIMESTAMP = option_value("package-timestamp") |