clasp icon indicating copy to clipboard operation
clasp copied to clipboard

How to update an existing deployment to new version?

Open sshaji opened this issue 4 years ago • 3 comments

Looks like there is no single command to do this.. But, I can do this by creating a new version first using "clasp version", then use "redeploy DID Version.." command.

But, because I want to automate the process, how can I get the version number created using the "clasp version" command to be included in the new "redeploy" command?

sshaji avatar Mar 15 '20 08:03 sshaji

If you specify only the deploymentId, it automatically creates a new version for you, and updates (redeploys) the deployment.

kalmi avatar Mar 15 '20 15:03 kalmi

I'm having the same problem. I want to easily update an Apps Script deployed as a web app but with out changing the URL of the webapp.

Currently I have to first run clasp deployments, get the current deployment Id, and then run clasp deploy -i {deployment_id} .

I'd prefer if there was a way to do this in one command with out me having to copy/paste Ids out of the command line.

ericanastas avatar May 08 '21 04:05 ericanastas

I wish this was a built in command. Updating the most recent deployment seems like it should be built in.

Currently I'd have to do something like this hack to do it automatically:

current_deployment=$(clasp deployments | tail -n1 | cut -d' ' -f2)
clasp deploy --deploymentId "${current_deployment}"

bburky avatar Sep 02 '21 19:09 bburky