Release Process
Relevant source files
The following files were used as context for generating this wiki page:
The release process for the Nextcloud CAD Viewer ensures that new versions of the application are stable, compatible with Nextcloud core requirements, and properly distributed through the Nextcloud App Store and GitHub. It encompasses updating upstream dependencies, validating code quality through static analysis and testing, and building optimized frontend assets for production use.
This process is critical for maintaining synchronization with the upstream cad-viewer and ensuring compatibility with specific Nextcloud versions, such as Nextcloud 33.
Sources: README.md:129-132, wiki/Home.md:31-31
Upstream Synchronization and Updates
The CAD Viewer relies heavily on external libraries from MLightCAD. A key part of the release cycle involves updating these dependencies to incorporate new features or bug fixes from the core CAD rendering engine.
Update Workflow
- Dependency Update: Update the
@mlightcad/cad-viewerand related packages using NPM. - Asset Rebuild: Run the production build script to compile the new dependency code into the Nextcloud app's JavaScript bundle.
- Verification: Conduct thorough testing with various DWG and DXF files.
- Persistence: Commit the updated
package.jsonandpackage-lock.json.
Sources: README.md:143-162, package.json:20-22
The diagram above illustrates the sequential flow of updating upstream dependencies before a new release.
Sources: README.md:146-161
Quality Assurance and Validation
Before a release is finalized, the codebase must pass a series of automated checks. The project follows Nextcloud organization template patterns for CI/CD, which are strictly enforced via GitHub Actions.
Backend Validation
- Static Analysis: Psalm is used for static analysis. The configuration in
psalm.xmlmust match the target PHP version (8.2+). - Unit Testing: PHPUnit tests are executed to verify backend logic.
- Coding Standards:
php-cs-fixerensures the code adheres to the Nextcloud coding standard.
Frontend Validation
- Linting: ESLint and Stylelint are used to check Vue components and CSS.
- Unit Testing: Jest handles frontend component testing.
- Type Checking:
vue-tscis used for TypeScript validation in the SFCs.
Sources: AGENTS.md:27-51, composer.json:34-42, package.json:11-17
Validation Commands Summary
| Task | Command | Description |
|---|---|---|
| PHP Linting | composer lint | Checks PHP syntax across the project. |
| Static Analysis | composer psalm | Performs deep static analysis of PHP code. |
| Backend Tests | composer test:unit | Runs the PHPUnit test suite. |
| Frontend Tests | npm test | Runs Jest unit tests. |
| Frontend Lint | npm run lint | Runs ESLint on the src/ directory. |
| Type Check | npm run check-types | Validates TypeScript types in Vue files. |
Sources: composer.json:34-43, package.json:11-17, AGENTS.md:38-42
Build and Distribution
The distribution of the CAD Viewer occurs through two primary channels: the Nextcloud App Store and GitHub Releases.
Production Build
Releases must include pre-built frontend assets. The build process uses Webpack to bundle Vue 3 components and the Element Plus UI library.
# Production build command
npm run build
Sources: package.json:12, README.md:65-69
App Metadata and Versioning
The version number must be updated consistently across several files to ensure the App Store and Nextcloud instance recognize the update:
appinfo/info.xml: The<version>tag defines the version for the Nextcloud ecosystem.package.json: The"version"field for NPM/Node compatibility.
Compatibility Matrix
Release managers must ensure the metadata in appinfo/info.xml correctly reflects the dependencies.
| Requirement | Value |
|---|---|
| PHP Version | ^8.2 |
| Nextcloud Version | 33 |
| License | MIT |
Sources: appinfo/info.xml:17-19, appinfo/info.xml:30-33, package.json:3-3
The sequence diagram shows the interaction between the developer, the source control system, and the distribution platform during a release.
Sources: README.md:47-49, AGENTS.md:53-56, wiki/Installation-Guide.md:104-106
Manual Release Packaging
When creating a manual release archive (for users who do not use the App Store), the following steps are required:
- Clean Environment: Ensure no
node_modulesare included in the final archive. - Archive Creation: The folder must be named
cad_viewerto match the internal ID. - Permissions: Files within the archive should be set to standard web server permissions (typically 755 for directories, 644 for files).
Sources: wiki/Installation-Guide.md:112-117, wiki/Installation-Guide.md:197-200
The release process concludes with the creation of a GitHub Release containing the source code and the pre-built application archive, followed by a changelog update in CHANGELOG.md to document the version history.
Sources: README.md:214-214, wiki/Home.md:52-52