Changes I make to my Code.gs
file don't seem to be recognized unless I deploy as webapp under a new version. Is this the designed behavior or am I doing something wrong elsewhere?
How about this answer? Please think of this as just one of several answers.
At the project that Web Apps is deployed, when the script in the project was modified, the Web Apps is required to be redeployed as new version. By this, the latest script is reflected to the Web Apps. This is the normal specification. I think that this situation might be supposed to separate the developing script and stable script.
There are several methods that the latest script can be automatically reflected to Web Apps when the script was modified.
When the developer mode is used, the latest script can be used for the Web Apps without redeploying as new version. When you deploy the Web Apps, you can see "latest code" which has a link. The URL is like https://script.google.com/macros/s/###/dev
. By using this URL, when the script was modified, you can use the latest script at Web Apps.
As an important point, when you use this, please use the access token. By this, you can access to the Web Apps. The sample curl can be seen at here.
If you want to automatically use the latest script using the URL like https://script.google.com/macros/s/#####/exec
, it can be achieved using a library. The preparation is as follows.
function doGet(e) {return library.run(e)}
.
library
.function run(e) { do something }
.
By above settings, when the script of Project "B" is modified, the latest script is automatically reflected to the Web Apps. By this, it is not required to redeploy as new version.
If I misunderstood your question and this was not the direction you want, I apologize.