AppMaker:每个部署的环境变量?获取部署名称?

问题描述:

有时候我问过这个问题:

Some times ago I asked this: How to check in both server-side and client-side scripts if we are in preview mode or deployed version

因为我希望代码中的预览模式与否都具有不同的逻辑.

Because I wanted in my code to have different logic whether it is the preview mode or not.

答案是预览模式只是另一个部署,每个部署都有自己的Drive表,在其中存储了一些env变量".没错,这很成功.

The answer was "preview mode is just another deployment and each deployment has its own Drive table, store some env variables there". That was true and made the trick.

问题:驱动器表不再存在.

过去几个月来我一直没有与AppMaker合作,所以也许我错过了新功能:

I have not been working with AppMaker the past months so maybe I have missed new features:

  • 如何为每个部署设置环境变量? (这样我就可以 产品部署与产品部署前部署之间的差异)

  • how can I set environment variables per deployment ? (so I can make a difference between my prod deployment and my pre-prod deployment)

是否可以从代码中获取当前部署名称?

is there a way to get the current deployment name from the code ?

感谢您的回答

可以使用 Google脚本属性服务.