clasp
clasp copied to clipboard
How to update an existing deployment to new version?
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?
If you specify only the deploymentId, it automatically creates a new version for you, and updates (redeploys) the deployment.
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.
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}"