'Will my Apps Script library update without using Head Development?

I have a library that I have published for use in a copyable spreadsheet template. I don't want to have to keep sharing the library with everyone who wants to make a copy of the document. If the document's bound script has the latest version of the library (excluding the head development), will the library update itself to the latest deployment?

Also, is there a way to have the library be automatically shared with whoever creates a copy of the template?



Solution 1:[1]

Using a library looks to not be the most convenient way to achieve your goal. Instead consider to publish an add-on.

The above because when adding a library to an Google Apps Script project you are only adding a pointer to the project holding the library code so if you want to make the templates copies to continue working you should not unshare the library.

When using and add-on you could put all the required code on it and doing that there it will not be necessary to share a Google Apps Script project (but you can't delete it otherwise the add-on users will not be able to use it anymore). Also it make it easier to make available to the users de last version of your script without having them to use the Google Apps Script editor to update the version number etc.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1