I am aware of the versioning that can be done using "Manage Version". Is there a way available to get/fetch the current version of the Spreadsheet script in/using Apps script .
2 Answers
If you mean "Can we programmatically retrieve the script version number?", the answer is no. There is an outstanding request for this, in Issue 1369, so visit the issue tracker and star it to indicate your own interest.
Perhaps you mean "Can we programmatically retrieve the most recent source code?"
You can Import and Export Stand-alone script files through the Drive SDK. In Apps Script, this can be accomplished using UrlFetch Services.
There is no way at this time to retrieve the source of container-bound scripts, except through the Script Editor. (See Limitations.)
1 Comment
Reviving a dead one here but others might find this as I have still searching for a solution.
Resolution of Issue 1369 as linked in the other answer is:
Jan 22, 2018 12:09PM
Marked as fixed, reassigned to [email protected].
As Federico states, with the new Apps Script API you can get script versions.
Also, with the CLI (github.com/google/clasp), you can get version info with:
clasp versions
this means we can fetch a list of versions but I still have not found a way of programmatically getting the version number and description from within a script.