[update 30 May 2019: This post has been outdated.
Google has released clasp which allows the development of app script locally]
Google App Script (GAS) is a very versatile tool for writing scripts to control many of the GSuites and Google Cloud services. One can build many small applications using GAS and hosts it seamlessly on Google Drive for free. It has a built-in editor, debugging tool and logging of logs to StackDriver. The main drawback I had with GAS is the difficulty to create save the scripts to source control like Github.
Fortunately, danthareja shared his tools to read/write app script into GDrive seamlessly, but the script has a limitation, it can only handle a single project. This is because it is writing the OAuth information into %UserProfile%\.gapp.
I wrote a simple wrapper script pull.bat and push.bat that synchronous the App Script.
pull.bat
push.bat
Together with danthareja script, I can easily use Github to perform my version control for my many app script projects.
Google has released clasp which allows the development of app script locally]
Google App Script (GAS) is a very versatile tool for writing scripts to control many of the GSuites and Google Cloud services. One can build many small applications using GAS and hosts it seamlessly on Google Drive for free. It has a built-in editor, debugging tool and logging of logs to StackDriver. The main drawback I had with GAS is the difficulty to create save the scripts to source control like Github.
Fortunately, danthareja shared his tools to read/write app script into GDrive seamlessly, but the script has a limitation, it can only handle a single project. This is because it is writing the OAuth information into %UserProfile%\.gapp.
I wrote a simple wrapper script pull.bat and push.bat that synchronous the App Script.
pull.bat
copy .gapps %UserProfile%\.gapps
gapps init [REPLACE YOU PROJECTID] -o
Copy the local version of the ".gapps" to the %UserProfile% directory and overwrite the local copy of the script file.push.bat
copy .gapps %UserProfile%\.gapps
gapps push
Copy the local version of the ".gapps" to the %UserProfile% directory and push to Google Drive.Together with danthareja script, I can easily use Github to perform my version control for my many app script projects.
Comments
Post a Comment