Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Add a command to update the application. #5

@kherge

Description

@kherge

Problem

As Sqon reaches a stable release, developers will need a way to update the Sqon application without having to manually download and reinstall the application from the Releases page.

Resolution

I would like to be able to run sqon self-update to update the Sqon application.

Process

The self-update command would process an update in the following manner:

  1. Download the release manifest from the Sqon application project website over HTTPS.
  2. Find an appropriate release.
    1. If --patch is used, only the next patch release will be searched for.
    2. If --minor is used, only the next minor release will be searched for.
    3. If --major is used, only the next major release will be searched for.
    4. If no option is used, any next available release will be searched for.
  3. If a new release is available, continue.
    • If a new release is not available, alert the user and stop here.
  4. The new release and its GPG signature are downloaded to a temporary location. This temporary location can be changed by specifying the --temp option. Download progress can be displayed as a progress bar.
  5. The GPG signature is verified.
    • If GPG is not available, a warning is reported and the user will be prompted to confirm that it is okay to skip the verification step.
      • The --no-verification option can be used to skip this step.
      • If the --no-interaction option is used, the prompt will always deny continuing without verification unless the --no-verification option is used.
  6. The current installation is replaced by the new release.

An --unstable option can be used to modify the other available options.

References

  1. https://github.com/composer/composer/blob/master/src/Composer/Command/SelfUpdateCommand.php
  2. https://github.com/box-project/amend/blob/master/src/lib/KevinGH/Amend/Command.php
  3. http://semver.org/spec/v2.0.0.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions