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

clasp deploy does not publish a new version of a Google Docs add-on #43

Closed
ryanolsonx opened this issue Feb 13, 2018 · 6 comments
Closed

Comments

@ryanolsonx
Copy link

I might be misunderstanding the term "deployment" in the context of this CLI. I expect that when I deploy a new version of my add-on, it would publish a new version of the add-on.

Expected Behavior

That clasp deploy {version} would publish a new version of my Google docs add-on.

Actual Behavior

After running the above command and test out the published add-on, I don't see the changes in the version used above.

Steps to Reproduce the Problem

  1. Publish an add-on with initial functionality
  2. Make some noticeable changes to the add-on (so that you know if it gets published)
  3. Use clasp push to get your changes into your Google script
  4. Use clasp version and clasp deploy {version} to deploy your changes
  5. Test out add-on to see the published changes

Specifications

  • Node version (node -v): v8.9.4
  • Version (npm list | grep clasp): 1.1.1
  • OS (Mac/Linux/Windows): Windows
@ryanolsonx
Copy link
Author

Follow up question: how do I change the current deployment that an add-on uses? Would I need to use the redeploy command to indicate which deployment should be used?

From the Apps Script Clasp Guide:

This command updates an existing deployment with a new version and description:
clasp redeploy <deploymentId> <version> <description>

@JeanRemiDelteil
Copy link
Contributor

While having this feature normalized would be great, it seems that for now it will not be possible with this API, mainly because Doc Add-on are deployed on the Chrome Webstore.

Hence you have to use the Chrome webstore API to deploy your Add-ons.
However, if you choose to use it to deploy an add-on, you will not be able to deploy it again manually, because of an AppsScript internal issue that is not keeping track of the Addon deployement version.

If you still want to go this way, you can use this project that allow local development and deploying your script via command line: https://github.com/JeanRemiDelteil/gas-shell.
I recommend a thorough read of the readme before starting

@ryanolsonx
Copy link
Author

ryanolsonx commented Feb 20, 2018

Thanks for the reply @JeanRemiDelteil. If the deploy command doesn't deploy a google docs add-on, what is the purpose of clasp deploy?

@JeanRemiDelteil
Copy link
Contributor

The deploy command is there to deploy a 'deployment', which can currently be used for webApp, execution API, or Gmail Addon. You can find the documentation on deployment here:
projects.deployments

For now, the deployment of Doc Add-on is not using the same logic.

Honestly I would love to be able to use a simple 'deploy' command in CLASP to update our Add-ons !
Maybe this new API will help prepare for this !?

@grant
Copy link
Contributor

grant commented Feb 25, 2018

@ryanolsonx The process of publishing an add-on is described here:

https://developers.google.com/apps-script/add-ons/publish

Interacting with the Chrome Web Store sounds like a good idea for a different CLI as it seems like a big set of commands with various options. It would be great if we could describe how to tie these two processes together.

Looks like there's already progress with an API/CLI:

API: https://developer.chrome.com/webstore/using_webstore_api
CLI: https://github.com/DrewML/chrome-webstore-upload-cli
npm: https://www.npmjs.com/package/chrome-store-api

Please comment if you try that CLI out and find success.

@grant
Copy link
Contributor

grant commented Apr 10, 2018

I don't plan to integrate the Chrome Webstore API in clasp anytime soon. That would be out of scope of this tool at the moment. There may be other CLIs that are dedicated for this case.

Thanks for the issue though. Feel free to still comment here if you think differently.

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

No branches or pull requests

3 participants