Version Control

69 views
Skip to first unread message

Andrew Roberts

unread,
Jan 23, 2020, 5:26:20 AM1/23/20
to Google Apps Script Community
Does anyone know of any moves to implement version control within the script editor, or are Google leaving people to go offline with things like clasp if they want to use it?

Dimu Designs

unread,
Jan 23, 2020, 10:17:44 AM1/23/20
to google-apps-sc...@googlegroups.com
Maybe we'll see progress on that if/when we move to V8.

In the meantime, I just stick with Leonhart's Github Assistant. Its not too hard to set up a distributed source control flow with it. Just push your project to a GIT repo and have it serve as the central "source-of-truth". Then have collaborators fork it from Github (or your repo of choice) and pull the source into their own GAS projects for testing, and they in turn make pull-requests with their changes. Could possibly do something similar to Bruce McPherson's GasGit library and automate a good chunk of that workflow via repo APIs and webhooks.

I've tried clasp in the past but it has issues when pushing code back to an apps script project where it sometimes mangles the execution order of multi-file GAS projects so I tend not to use it much (some open-source devs tried to resolve this via the 'filepushOrder' feature, but it doesn't quite fix it). 

Michael O'Shaughnessy

unread,
Jan 23, 2020, 4:10:06 PM1/23/20
to google-apps-sc...@googlegroups.com
I have to agree, using  Leonhart's Github Assistant is easy and straightforward.  I was doing SO MUCH copy and pasting as I was working on GAS projects... this extension has SAVED me!!  Here is a link to the extension:  https://chrome.google.com/webstore/detail/google-apps-script-github/lfjcgcmkmjjlieihflfhjopckgpelofo

I would also add that using this extension has helped me learn what Version Control is and how to use GIT.  I highly recommend it!!

On Thu, Jan 23, 2020 at 10:17 AM Dimu Designs <dimud...@gmail.com> wrote:
Maybe we'll see progress on that if/when we move to V8.

In the meantime, I just stick with Leonhart's Github Assistant. Its not too hard to set up a distributed source control flow with it. Just push your project to a GIT repo and have it serve as the central "source-of-truth". Then have collaborators fork it from Github (or your repo of choice) and pull the source into their own GAS projects for testing, and they in turn make pull-requests with their changes. Could possibly do something similar to Bruce and automate the entire workflow via APIs and webhooks.

I've tried clasp in the past but it has issues when pushing code back to an apps script project where it sometimes mangles the execution order of multi-file GAS projects (the dev tried to resolve this via the 'filepushOrder' feature, but it doesn't quite fix it). 


On Thursday, January 23, 2020 at 5:26:20 AM UTC-5, andrew wrote:
Does anyone know of any moves to implement version control within the script editor, or are Google leaving people to go offline with things like clasp if they want to use it?

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/2279ce22-3a41-457a-9205-987c350cece6%40googlegroups.com.

David Gentile

unread,
Jan 24, 2020, 5:26:13 AM1/24/20
to Google Apps Script Community
Personally I find clasp ideal because it means I can write code using VS Code, utilising all the superior editing tools/extensions/built in cmd line/etc. 

For smaller projects I do use the GAS editor and the GitHub Assistant extension, but I only really use that as a backup tool and not as version control. Other than that the only time I'm using the editor is to actually run code for testing/logs.

Dimu Designs

unread,
Jan 24, 2020, 7:08:14 AM1/24/20
to google-apps-sc...@googlegroups.com
I also use VS code for my apps script projects. 

The option to use a different editor was available long before clasp came into being. Prior to the Apps Script API (which is what clasp uses to push code to GAS projects) developers would use the Drive API to import/export GAS projects (see documentation). One of the benefits of using the Drive API import/export is that it doesn't mess up the file execution order of a GAS project. 
Reply all
Reply to author
Forward
0 new messages