summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2023-03-28 08:42:47 +0200
committerGitHub <noreply@github.com>2023-03-28 08:42:47 +0200
commit330eb5cff0f25c2dbc27969a9ce8daef91e4f847 (patch)
treeeba8577f8ba0421f10b24a106197e1ba117e4b9d
parentc9ebfe30aee32f1825aa807a38c41b426ec353cc (diff)
📦 Enable support for git archive installs (#470)
This patch enables the end-users to succeed installing from GitHub source Git archive URLs, letting `setuptools-scm` calculate the distribution version correctly, including the exports of non-tagged commits [[1]]. `setuptools-scm` is the underlying library that `hatch-vcs` wraps which is why the configuration pre-requisites and runtime assumptions are inherited. Resolves #464. [1]: https://github.com/pypa/setuptools_scm#git-archives
-rw-r--r--.git_archival.txt4
-rw-r--r--.gitattributes5
l---------gitlint-core/.git_archival.txt1
3 files changed, 10 insertions, 0 deletions
diff --git a/.git_archival.txt b/.git_archival.txt
new file mode 100644
index 0000000..8fb235d
--- /dev/null
+++ b/.git_archival.txt
@@ -0,0 +1,4 @@
+node: $Format:%H$
+node-date: $Format:%cI$
+describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
+ref-names: $Format:%D$
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..ec8c333
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,5 @@
+# Force LF line endings for text files
+* text=auto eol=lf
+
+# Needed for setuptools-scm-git-archive
+.git_archival.txt export-subst
diff --git a/gitlint-core/.git_archival.txt b/gitlint-core/.git_archival.txt
new file mode 120000
index 0000000..d7a42b2
--- /dev/null
+++ b/gitlint-core/.git_archival.txt
@@ -0,0 +1 @@
+../.git_archival.txt \ No newline at end of file