From 1b2a4c75524927202ea0c729d4e8753189df1cc2 Mon Sep 17 00:00:00 2001
From: JamesRezo <james@rezo.net>
Date: Mon, 21 Feb 2022 01:18:19 +0100
Subject: [PATCH] build: .gitattributes pour la commande composer archive

---
 .gitattributes | 19 +++++++++++++++++++
 .gitignore     | 45 ++++++++++++++++++++++++++++-----------------
 composer.json  |  1 +
 3 files changed, 48 insertions(+), 17 deletions(-)
 create mode 100644 .gitattributes

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000000..05ce7fc543
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,19 @@
+.DS_Store export-ignore
+.editorconfig export-ignore
+.gitignore export-ignore
+.gitattributes export-ignore
+.htaccess export-ignore
+/IMG/ export-ignore
+/config/ export-ignore
+docker-compose.override.yml export-ignore
+docker-compose.yml export-ignore
+/lib/ export-ignore
+/local/ export-ignore
+/plugins/ export-ignore
+/squelettes/ export-ignore
+/tmp/ export-ignore
+/lib/ export-ignore
+/mutualisation/ export-ignore
+/sites/ export-ignore
+/tests/ export-ignore
+/themes/ export-ignore
diff --git a/.gitignore b/.gitignore
index 0fb74874ce..a1a085f514 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,28 +1,39 @@
+# composer & outils
 /vendor/
 /composer.phar
 /phpcs.xml
 /phpstan.neon
+/docker-compose.override.yml
+/docker-compose.yml
 
+# SPIP
+/IMG/
+!/IMG/remove.txt
+/config/
+!/config/remove.txt
+/local/
+!/local/CACHEDIR.TAG
+!/local/remove.txt
+/plugins-dist/
+/squelettes-dist/
+/tmp/
+!/tmp/CACHEDIR.TAG
+!/tmp/remove.txt
+
+# Contrib ou personalisation
+/.htaccess
+/lib/
+/mutualisation/
+/plugins/
+/sites/
+/squelettes/
+/tests/
+/themes/
+
+# IDE
 **/.DS_Store
-**/.htaccess
 /.buildpath
 /.project
 /.settings
 /.idea/
 /.vscode/*
-IMG/*
-config/*
-ecrire/inc_connect.php3
-ecrire/inc_meta_cache.php3
-/extensions
-/lib
-local/*
-/mutualisation
-/plugins
-/plugins-dist
-/sites
-/squelettes
-/squelettes-dist
-/tests
-/themes
-tmp/*
diff --git a/composer.json b/composer.json
index 8bc703efc1..88e998ff5e 100644
--- a/composer.json
+++ b/composer.json
@@ -1,4 +1,5 @@
 {
+    "license": "GPL-3.0-only",
     "require": {
         "php": "^7.4 || ^8.0",
         "ext-sodium": "*",
-- 
GitLab