Skip to content

Commit

Permalink
DOCS-1899: Remove update from module create (#2611)
Browse files Browse the repository at this point in the history
  • Loading branch information
andf-viam authored Mar 7, 2024
1 parent b368e0b commit 52070bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/fleet/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ If you update and release your module as part of a continuous integration (CI) w
| command option | description | positional arguments
| ----------- | ----------- | ----------- |
| `create` | generate new metadata for a custom module on your local filesystem | - |
| `update` | update an existing custom module on your local filesystem with recent changes to the [`meta.json` file](#the-metajson-file) | - |
| `update` | update an existing custom module on your local filesystem with recent changes to the [`meta.json` file](#the-metajson-file). Note that the `upload` command automatically runs `update` for you; you do not need to explicitly run `update` if you are also running `upload` | - |
| `upload` | validate and upload a new or existing custom module on your local filesystem to the Viam registry. See [Upload validation](#upload-validation) for more information | **module-path** : specify the path to the file, directory, or compressed archive (with `.tar.gz` or `.tgz` extension) that contains your custom module code |
| `build start` | start a module build in a cloud runner using the build step in your [`meta.json` file](#the-metajson-file). See [Using the `build` subcommand](#using-the-build-subcommand) | - |
| `build local` | start a module build locally using the build step in your [`meta.json` file](#the-metajson-file). See [Using the `build` subcommand](#using-the-build-subcommand) | - |
Expand Down
28 changes: 5 additions & 23 deletions docs/registry/upload/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You can upload your module in one of two ways:

## Upload a custom module using the CLI

To upload your custom module to the [Viam registry](https://app.viam.com/registry), either as a public or private module, use the Viam CLI commands `create`, `upload`, and `update` following these instructions:
To upload your custom module to the [Viam registry](https://app.viam.com/registry), either as a public or private module, use the Viam CLI commands `create` and `upload` following these instructions:

1. First, [install the Viam CLI](/fleet/cli/#install) and [authenticate](/fleet/cli/#authenticate) to Viam, from the same machine that you intend to upload your module from.

Expand Down Expand Up @@ -158,16 +158,7 @@ For more information, see [Naming your model](/registry/#naming-your-model-names
See [`meta.json` file](/fleet/cli/#the-metajson-file) for more information.
4. Run `viam module update` to register the configuration changes you just made to `meta.json` with the Viam registry.
Run this command from within the same directory as your `meta.json` file:
```sh {id="terminal-prompt" class="command-line" data-prompt="$"}
viam module update
```
On a successful update, the command will return a link to the updated module in the Viam registry.
5. For modules written in Python, you should package your module files as an archive first, before uploading.
4. For modules written in Python, you should package your module files as an archive first, before uploading.
Other languages can proceed to the next step to upload their module directly.
To package a module written in Python, run the following command from the same directory as your `meta.json` file:
Expand All @@ -179,7 +170,7 @@ For more information, see [Naming your model](/registry/#naming-your-model-names
Supply the path to the resulting archive file in the next step.
6. Run `viam module upload` to upload your custom module to the Viam registry.
5. Run `viam module upload` to upload your custom module to the Viam registry.
Specify the path to the file, directory, or compressed archive (with `.tar.gz` or `.tgz` extension) that contains your custom module code:
```sh {id="terminal-prompt" class="command-line" data-prompt="$"}
Expand Down Expand Up @@ -249,19 +240,10 @@ To update an existing module in the [Viam registry](https://app.viam.com/registr
If you intend to make frequent code changes to your module, want to support a variety of platforms, or otherwise want to streamline your module development workflow, consider [using a GitHub action to update your module](#update-an-existing-module-using-a-github-action) instead.
{{% /alert %}}
1. Edit your custom module with the changes you'd like to make.
1. Edit your custom module code with the changes you'd like to make.

1. Update your custom module's `meta.json` file with any needed changes.
For example, if you have altered your model's name, or adjusted the endpoint name, you'll need to update `meta.json` with these changes.
1. Run `viam module update` to register the configuration changes you just made to `meta.json` with the Viam registry.
Run this command from within the same directory as your `meta.json` file:
```sh {id="terminal-prompt" class="command-line" data-prompt="$"}
viam module update
```
On a successful update, the command will return a link to the updated module in the Viam registry.
For example, if you have altered your model's description, or adjusted the endpoint name, you'll need to update `meta.json` with these changes.
1. For modules written in Python, you should package your module files as an archive first, before uploading.
Other languages can proceed to the next step to upload their module directly.
Expand Down

0 comments on commit 52070bf

Please sign in to comment.