Skip to content

feat: Introduce releaseFull command for automated releases #13

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sumyfly
Copy link

@sumyfly sumyfly commented May 27, 2025

This commit introduces a new releaseFull command to the CLI. This command streamlines the release process by orchestrating the creation of a differential hot update package (.ppk), publishing it, and binding it to a specified native application version in a single, non-interactive operation.

Key changes include:

  • New releaseFull command:

    • Defined in cli.json with options for diff inputs (origin, next, output), publishing metadata (platform, name, description, metaInfo, packageVersion), and update parameters (rollout, dryRun).
    • Implemented in src/release.ts, coordinating calls to diff, publish, and update services.
    • Registered in src/index.ts.
  • Refactoring of Core Logic:

    • src/bundle.ts: Exported diffFromPPK for direct use. The bundle command now accepts packageVersion and other publishing metadata, and can publish non-interactively if name is provided, as per the supplied patch.
    • src/versions.ts:
      • Extracted executePublish for non-interactive bundle publishing.
      • Introduced getPackagesForUpdate for non-interactive package selection based on native packageVersion. - commands.publish and commands.update now leverage these refactored functions and incorporate changes from the supplied patch (e.g., direct use of metaInfo, handling of packageVersion, and conditional skipping of prompts).
  • Testing:

    • Added preliminary Jest tests for the releaseFull command, focusing on its orchestration logic, option passing, and error handling for missing required options.

This new command addresses the issue requirement by providing a comprehensive, all-in-one CLI entry point for creating, uploading, and binding hot update bundles, significantly improving automation capabilities.

This commit introduces a new `releaseFull` command to the CLI.
This command streamlines the release process by orchestrating the
creation of a differential hot update package (.ppk), publishing it,
and binding it to a specified native application version in a single,
non-interactive operation.

Key changes include:

- New `releaseFull` command:
    - Defined in `cli.json` with options for diff inputs (`origin`, `next`, `output`),
      publishing metadata (`platform`, `name`, `description`, `metaInfo`,
      `packageVersion`), and update parameters (`rollout`, `dryRun`).
    - Implemented in `src/release.ts`, coordinating calls to diff, publish,
      and update services.
    - Registered in `src/index.ts`.

- Refactoring of Core Logic:
    - `src/bundle.ts`: Exported `diffFromPPK` for direct use. The `bundle`
      command now accepts `packageVersion` and other publishing metadata,
      and can publish non-interactively if `name` is provided, as per
      the supplied patch.
    - `src/versions.ts`:
        - Extracted `executePublish` for non-interactive bundle publishing.
        - Introduced `getPackagesForUpdate` for non-interactive package selection
          based on native `packageVersion`.
        - `commands.publish` and `commands.update` now leverage these
          refactored functions and incorporate changes from the supplied
          patch (e.g., direct use of `metaInfo`, handling of `packageVersion`,
          and conditional skipping of prompts).

- Testing:
    - Added preliminary Jest tests for the `releaseFull` command, focusing on
      its orchestration logic, option passing, and error handling for
      missing required options.

This new command addresses the issue requirement by providing a comprehensive,
all-in-one CLI entry point for creating, uploading, and binding hot update
bundles, significantly improving automation capabilities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant