Browse Source

Add a .gitattributes recommendation to the AssetLib guidelines

(cherry picked from commit f035fe9e2018970756fc92ad5e394cc76cdcb55a)
Yuri Sizov 4 years ago
parent
commit
db0b3b25e4
1 changed files with 25 additions and 0 deletions
  1. 25 0
      tutorials/assetlib/uploading_to_assetlib.rst

+ 25 - 0
tutorials/assetlib/uploading_to_assetlib.rst

@@ -75,6 +75,31 @@ library a better place for all users.
 * If your asset is a library for working with other files,
   consider including example files in the asset.
 
+* Consider adding a **.gitattributes** file to your repo and listing
+  files not required by your asset to function with the ``export-ignore``
+  directive. This directive removes such files from the resulting ZIP file
+  and prevents them from being downloaded by the asset library users.
+  For a typical plugin **.gitattributes** may look like this:
+
+  .. code-block:: none
+
+    /.gitattributes     export-ignore
+    /.gitignore         export-ignore
+    /LICENSE            export-ignore
+    /LICENSE.md         export-ignore
+    /README.md          export-ignore
+    /project.godot      export-ignore
+    /icon.png           export-ignore
+    /icon.svg           export-ignore
+
+  Other types of assets may require a different configuration (e.g.
+  a project template requires **project.godot**).
+
+* If you are submitting a plugin, add a copy of your license and readme
+  to the plugin folder itself. This is the folder that users are guaranteed to
+  keep with their project, so a copy ensures they always have those files handy
+  (and helps them fulfill your licensing terms).
+
 * The icon should be a square, its aspect ratio should be 1:1. It should
   also ideally have a minimum resolution of 64x64 pixels.