-
Notifications
You must be signed in to change notification settings - Fork 42
feat: Support VERSION file #490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#490
Reviewer's GuideThis PR externalizes the project version into a standalone VERSION file, updates the CMake build to read and cache that file, and adds an automated GitHub workflow along with supporting files for release and sync exclusion. Sequence Diagram for CMake Project Version InitializationsequenceDiagram
participant CMakeLists.txt
participant FileSystem
participant CMakeCache
CMakeLists.txt->>FileSystem: Read "${CMAKE_CURRENT_SOURCE_DIR}/VERSION"
FileSystem-->>CMakeLists.txt: Return file content (DTK_FILE_VERSION)
CMakeLists.txt->>CMakeLists.txt: Strip whitespace from DTK_FILE_VERSION
CMakeLists.txt->>CMakeCache: Set DTK_VERSION = DTK_FILE_VERSION
Sequence Diagram for Auto Release Workflow TriggersequenceDiagram
actor User
participant GitHub_UI as "GitHub UI/API"
participant CallAutoReleaseWorkflow as "call-auto-release.yml"
participant ReusableAutoReleaseWorkflow as "linuxdeepin/.../auto-release.yml"
User->>GitHub_UI: Trigger 'Auto Release' (workflow_dispatch)
GitHub_UI->>CallAutoReleaseWorkflow: Start workflow with inputs (version, name, email, timezone)
CallAutoReleaseWorkflow->>ReusableAutoReleaseWorkflow: Call with inputs & secrets
ReusableAutoReleaseWorkflow-->>CallAutoReleaseWorkflow: (Performs release tasks)
CallAutoReleaseWorkflow-->>GitHub_UI: Workflow status
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @asterwyx - I've reviewed your changes - here's some feedback:
- Consider adding
FORCEto theset(DTK_VERSION "${DTK_FILE_VERSION}" CACHE STRING "Define project version" FORCE)call so that the cached variable updates when the VERSION file changes. - Pin the
uses: linuxdeepin/.github/.github/workflows/auto-release.yml@masterreference to a specific commit or tag instead ofmasterto prevent unexpected CI breakages from upstream changes.
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.
|
|
||
| jobs: | ||
| auto_release: | ||
| uses: linuxdeepin/.github/.github/workflows/auto-release.yml@master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion (bug_risk): Pin the reusable workflow to a specific tag or commit
Referencing 'master' can introduce instability if upstream changes unexpectedly. Use a fixed tag or commit SHA to ensure consistent workflow behavior.
Suggested implementation:
uses: linuxdeepin/.github/.github/workflows/[email protected]
Replace v1.2.3 with the actual tag or commit SHA you want to pin to, based on the version of the reusable workflow you intend to use.
Use VERSION file to manage DTK version. VERSION file defines package version. It also decides the initial value of cached variable DTK_VERSION which controls the project version in cmake build system. VERSION file is not synchronized to DTK6, as DTK6 has its own VERSION file. One can still pass version to DTK_VERSION when running cmake configure. This is helpful for developers. Signed-off-by: Yixue Wang <[email protected]>
Log: as title Signed-off-by: Yixue Wang <[email protected]>
deepin pr auto review代码审查意见:
总体来说,代码改动看起来是合理的,但是需要确保所有新增的文件和变量都有正确的用途和格式,并且与现有的构建流程和版本管理策略保持一致。 |
Synchronize source files from linuxdeepin/dtkdeclarative. Source-pull-request: linuxdeepin/dtkdeclarative#490
|
/retest |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: asterwyx, zccrs 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 |
Use VERSION file to manage DTK version. VERSION file defines package
version. It also decides the initial value of cached variable
DTK_VERSION which controls the project version in cmake build system.
VERSION file is not synchronized to DTK6, as DTK6 has its own VERSION
file. One can still pass version to DTK_VERSION when running cmake
configure. This is helpful for developers.
Signed-off-by: Yixue Wang [email protected]
Summary by Sourcery
Manage the project version via an external VERSION file in the CMake build and set up an automated GitHub Actions workflow for releases
New Features:
Chores: