I am using clasp to manage a Google Sheets Script (web app)
I tried to make a new deploy according to the instructions using: clasp deploy --deploymentId abcd1234
The command went through without errors. I can see a new version of the script created but the deployment is not updated: no deployment is made.
I found this conversation when digging deeper.
Summary: You need to add some code to your manifest file appscript.json:
"webapp": {
"access": "MYSELF",
"executeAs": "USER_DEPLOYING"
},
The whole appscript.json file should look like this (so you can see where to place the code:
{
"timeZone": "America/New_York",
"dependencies": {
},
"webapp": {
"access": "MYSELF",
"executeAs": "USER_DEPLOYING"
},
"exceptionLogging": "STACKDRIVER"
}
Furthermore here is an overview of the different options available (full documentation here https://developers.google.com/apps-script/manifest/web-app-api-executable?hl=fr#webapp):
"webapp": {
"access": "MYSELF"
"access": "DOMAIN"
"access": "ANYONE"
"access": "ANYONEANYONE_ANONYMOUS",
"executeAs": "USER_DEPLOYING"
"executeAs": "USER_ACCESSING"
"executeAs": "ANYONE_ANONYMOUS"
},
After updating the manifest file push the changes using clasp push. Then deploy with the commands in the instructions: clasp deploy --deploymentId abcd1234
Additional note to anyone new to clasp: there is a difference between version and deployment. A version is similar to a git tag (a way of keeping track of code), while a deployment is actual code that is being used for execution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With