Using different configuration options for each deployment

41 views
Skip to first unread message

Maarten Boekhold

unread,
Apr 23, 2019, 2:27:56 AM4/23/19
to Google Apps Script Community
Hi all,

I have a little Apps Script project around Forms & Sheets which is starting to get some active usage. In order to keep the solution stable for users while I hack away in the code, I need to publish this App as a Versioned Deployment (PROD), so I can code away in HEAD.

However, I'll need to use different config options for PROD and HEAD. Things like file paths, email addresses.

Is there a way to attach some sort of "configuration object" to a specific deployment that I can then access from the code to retrieve these deployment-specific configuration options?

Kind regards, Maarten

ekoleda...@googlers.com

unread,
Apr 30, 2019, 8:34:34 AM4/30/19
to Google Apps Script Community
In short, no, Apps Script's support for deployments is still rather basic. I've heard of folks that use clasp and client-side build scripts to build and deploy different versions of their scripts and deploy them.

- Eric

Alan Wells

unread,
Apr 30, 2019, 8:55:59 AM4/30/19
to google-apps-sc...@googlegroups.com
Personally, I like to have totally separate files for production and development.  Once that code is in production I want to do absolutely nothing to it, except if it needs a new version published.  You can upload file content from the Apps Script code editor to GitHub, bitbucket, or GitLab, and then download it to a different Apps Script file.

You can also use clasp to do that same thing.

I'd create a separate gs file just for your app settings, and then just change the settings in the production version. 


--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/bd0a2bd1-a951-4ad4-bf20-d19783dc5666%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages