sync: from linuxdeepin/dtkdeclarative - #260
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-ci-robot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideSynchronize DTK Declarative with the linuxdeepin upstream by externalizing version handling via a new VERSION file and adding synchronization support files. Sequence Diagram: CMake Reading Project VersionsequenceDiagram
participant CMakeProcess as "CMake Process (CMakeLists.txt)"
participant FileSystem
participant VersionFile as "VERSION File"
CMakeProcess->>FileSystem: file(READ "VERSION")
FileSystem-->>CMakeProcess: Raw content (e.g., "5.6.24\n")
CMakeProcess->>CMakeProcess: string(STRIP content)
Note right of CMakeProcess: DTK_FILE_VERSION = "5.6.24"
CMakeProcess->>CMakeProcess: set(DTK_VERSION, DTK_FILE_VERSION)
Note right of CMakeProcess: Project version set to "5.6.24"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @deepin-ci-robot - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DTK_FILE_VERSION) | ||
| string(STRIP "${DTK_FILE_VERSION}" DTK_FILE_VERSION) | ||
| set(DTK_VERSION "${DTK_FILE_VERSION}" CACHE STRING "Define project version") |
There was a problem hiding this comment.
suggestion: Consider behavior if VERSION file is missing or empty.
If the 'VERSION' file is missing or empty, DTK_VERSION will also be empty. Should we add a check to handle this case, such as providing a default value or raising an error?
| file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DTK_FILE_VERSION) | |
| string(STRIP "${DTK_FILE_VERSION}" DTK_FILE_VERSION) | |
| set(DTK_VERSION "${DTK_FILE_VERSION}" CACHE STRING "Define project version") | |
| if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/VERSION") | |
| file(READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" DTK_FILE_VERSION) | |
| string(STRIP "${DTK_FILE_VERSION}" DTK_FILE_VERSION) | |
| if(DTK_FILE_VERSION STREQUAL "") | |
| message(FATAL_ERROR "VERSION file is empty. Please provide a valid version.") | |
| endif() | |
| set(DTK_VERSION "${DTK_FILE_VERSION}" CACHE STRING "Define project version") | |
| else() | |
| message(FATAL_ERROR "VERSION file not found. Please create a VERSION file with the project version.") | |
| endif() |
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#490
a7aec4c to
5d1a2c1
Compare
deepin pr auto review关键摘要:
是否建议立即修改:
|
|
TAG Bot New tag: 6.0.37 |
|
TAG Bot New tag: 6.0.38 |
|
TAG Bot New tag: 6.0.39 |
Synchronize source files from linuxdeepin/dtkdeclarative.
Source-pull-request: linuxdeepin/dtkdeclarative#490
Summary by Sourcery
Sync build configuration with upstream by externalizing project version and adding sync support files
Enhancements:
Chores: