Skip to content

Add a self-update command to the CLI #9

@hierynomus

Description

@hierynomus

As a customer, I want to be able to update the CLI, so that I can take advantage of all the newest features

Problem

Currently there is no (easy) way described/available to update the new StackState CLI. This leads to questions from customers on how to update the CLI, or which version they need.

Solution

Implement an sts update command that checks whether the latest version of the CLI is installed and if not installs it.

The command should support the following flags:

  • --dry-run – Only check whether a new version is available

The output of the command should be:

New version Dry-run JSON Text
{ "version": "<new>", "latest": false, "upgraded": true } Upgraded to version '<new>'
{ "version": "<new>", "latest": false, "upgraded": false } Newer version '<new>' is available
{ "version": "<current>", "latest": true, "upgraded": false } You're running the latest version
{ "version": "<current>", "latest": true, "upgraded": false } You're running the latest version

Implementation

A nice framework/library for building this might be https://github.com/mouuff/go-rocket-update , which allows to implement a provider to check our S3 bucket for the latest version and download from there.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions