Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update an existing deployment to new version? #752

Open
sshaji opened this issue Mar 15, 2020 · 3 comments
Open

How to update an existing deployment to new version? #752

sshaji opened this issue Mar 15, 2020 · 3 comments

Comments

@sshaji
Copy link

sshaji commented Mar 15, 2020

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?

@kalmi
Copy link
Contributor

kalmi commented Mar 15, 2020

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

kalmi added a commit to kalmi/clasp that referenced this issue Mar 15, 2020
This would have helped me immensely. There seems to be a lot of confusion around redeployments, see google#63 and see the somewhat unrelated google#752 with lots of "unrelated" comments
kalmi added a commit to kalmi/clasp that referenced this issue Mar 15, 2020
This would have helped me immensely. There seems to be a lot of confusion around redeployments, see google#752 and see the somewhat unrelated google#63 with lots of "unrelated" comments
@ericanastas
Copy link

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.

@bburky
Copy link

bburky commented Sep 2, 2021

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}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants