Skip to content

Implement ockam uninstall and ockam upgrade commands #4916

Open
@mrinalwadhwa

Description

Current

We have an install script that:
https://github.com/build-trust/ockam/blob/develop/install.sh

  1. Downloads an architecture specific ockam release binary, by default for the latest released version on Github.
  2. Installs the binary to ${install_path}/bin/ockam an install path, which is by default ~/.ockam
  3. Adds an env file to ${install_path}/env that sets up $OCKAM_HOME
  4. Adds ${install_path}/env to various shell specific rc files like bashrc etc.

We also have a homebrew formula that installs ockam as part of homebrew:
https://github.com/build-trust/homebrew-ockam

We also have some logic in Ockam Command code that tells us there is a new release available:
https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_command/src/upgrade.rs

Desired

Implement ockam uninstall command which would:

  1. do the opposite steps of the install script if the install was done using the install script
  2. run brew uninstall ockam if the install was done as part of homebrew

Implement ockam upgrade command which would:

  1. Do some pre-upgrade steps
    i. for now this can list all running nodes and stop them.
  2. Upgrade the ockam command binary with the version suggested in upgrade.json
  3. Do some post-upgrade steps
    i. for now this can restart all the nodes that were stopped.

https://github.com/build-trust/ockam/blob/develop/implementations/rust/ockam/ockam_command/src/lib.rs#L373


We love helping new contributors!
If you have questions or need help as you work on your first Ockam contribution, please leave a comment on this discussion.
If you're looking for other issues to contribute to, checkout this discussion and labels - good first issue or help wanted

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions