How to manage different release versions of a Google Appscript Addon

51 views Asked by At

I developed a Google AppScript AddOn using clasp for pushing it to the AppScript Project.

Now I want to push a similar version to a different AppScript project, which should have the same code base but following changes:

  • different scriptId obviously
  • different appscript.json ( or at least parts of it should be different)
  • some strings inside the code should be different
  • some UI elements should be excluded

My current idea looks like this:

Use a bash script of google/zx to create a deploy script which changes the scriptId and appscript.json before pushing via clasp.

For variables I would just add a dictionary for each release configuration, and the UI elements the only solution I can think of is to have a conditional statement to check which release configuration is used and exclude it.

I would like to set this release configuration based on a value in the ScriptProperies but I also would like set this value when deploying, but how? Afaik you can not set properties in the appsscript.json.

Overall this approach is not very nice and I hope that someone can give me some input for improvements.

0

There are 0 answers