Skip to content

Feature Request - Add optional scriptId argument to list-deployments and list-versions and --json option #1060

@wattry

Description

@wattry

*edit: PR

Is your feature request related to a problem? Please describe.
When trying to maintain the dependencies of a script it would be useful to provide a script id and get the deployments and versions in order to update the libraries to the latest version. Currently you have to have the script defined in your current project or be able to pull the script. Having the option to receive the output as JSON would allow using the response to update the packages to the latest version using scripting.

Describe the solution you'd like

Optional scriptId argument which uses the provided scriptId instead of the the .clasp.json scriptId key. Also add the option to get the response in JSON using the --json flag.

clasp list-versions [scriptId]

clasp list-deployments [scriptId]

clasp list-versions --json [scriptId]

clasp list-deployments --json [scriptId]

Describe alternatives you've considered
Using bash to iterate over the new lines and split the output in order to get the last entry and it's version.

Additional context
This would make collaborating with users consuming the scripts as libraries easier as they could use the clasp cli to see the latest versions.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions