[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] elpa-admin cc63328 234/357: * GNUmakefile (.gitignore): New rule
From: |
Stefan Monnier |
Subject: |
[elpa] elpa-admin cc63328 234/357: * GNUmakefile (.gitignore): New rule |
Date: |
Thu, 10 Dec 2020 18:06:50 -0500 (EST) |
branch: elpa-admin
commit cc633282cac9e535a8da1f6c0df873790cc762ac
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>
* GNUmakefile (.gitignore): New rule
(all): Use it.
* admin/archive-contents.el (archive-gitignore-externals): New function.
* .gitignore: Update.
---
GNUmakefile | 6 +++++-
admin/archive-contents.el | 24 ++++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/GNUmakefile b/GNUmakefile
index d23d523..7d6d100 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -8,7 +8,7 @@ SITE_DIR=site
.PHONY: archive-tmp changelogs process-archive archive-full org-fetch clean
all do-it
-all: all-in-place
+all: all-in-place .gitignore
CR_EXCEPTIONS=copyright_exceptions
.PHONY: check_copyrights
@@ -81,6 +81,10 @@ archive-full: archive-tmp org-fetch
#mkdir -p archive/admin
#cp admin/* archive/admin/
+.gitignore: externals-list
+ $(EMACS) -l $(CURDIR)/admin/archive-contents.el \
+ --eval '(archive-gitignore-externals "$<" "$@")'
+
# FIXME: Turn it into an `external', which will require adding the notion of
# "snapshot" packages.
org-fetch: archive-tmp
diff --git a/admin/archive-contents.el b/admin/archive-contents.el
index 2b1ffec..6f19177 100755
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@ -761,5 +761,29 @@ If WITH-CORE is non-nil, it means we manage :core packages
as well."
(_ (message "Unknown external package kind `%S' for %s"
kind name)))))))
+;;; Manage .gitignore
+
+(defun archive-gitignore-externals (elf gf)
+ (let* ((el (read (find-file-noselect elf)))
+ (exts (delq nil
+ (mapcar (lambda (x)
+ (if (eq :external (nth 1 x)) (car x)))
+ el)))
+ (core (delq nil
+ (mapcar (lambda (x)
+ (if (eq :core (nth 1 x)) (car x)))
+ el))))
+ (with-current-buffer (find-file-noselect gf)
+ (goto-char (point-min))
+ (when (re-search-forward
+ "#.*External.*git.*\n\\(packages/[^*/\n]+/?\n\\)+"
+ nil 'move)
+ (replace-match ""))
+ (insert "# External packages with their own .git tree [autogenerated].\n"
+ (mapconcat (lambda (p) (format "packages/%s/\n" p))
+ (sort (append exts core) #'string<)
+ ""))
+ (save-buffer))))
+
(provide 'archive-contents)
;;; archive-contents.el ends here
- [elpa] elpa-admin d30f5d1 337/357: * GNUmakefile (RULE-singlepkg): New rule(s) to compile single-pkg (bug#38140), (continued)
- [elpa] elpa-admin d30f5d1 337/357: * GNUmakefile (RULE-singlepkg): New rule(s) to compile single-pkg (bug#38140), Stefan Monnier, 2020/12/10
- [elpa] elpa-admin a186f57 335/357: * README: Convert to org-mode and prepare for export., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin f6670e0 334/357: * .gitignore: Ignore all the unregistered files under `packages`, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin cff34fa 336/357: Support generating readme.html from README, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 9822a67 315/357: README: Mention that the copyright in ELPA is with the FSF, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin d0cae44 318/357: * admin/archive-contents.el: Unbreak elpa.gnu.org build, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 7be6e5f 330/357: ; Update copyright year, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 78966fe 348/357: * README.org: Improve introductory paragraphs., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 2ce3401 333/357: * README: Don't recommend to keep code on `master` any more, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin a30b538 216/357: Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs/elpa, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin cc63328 234/357: * GNUmakefile (.gitignore): New rule,
Stefan Monnier <=
- [elpa] elpa-admin 4fdec5b 230/357: packages/yasnippet: subtree pull from external, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 62629ab 224/357: Merge commit 'd827bb511203a64da3ae5cc6910b87b7c99d233b', Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 0a995ba 296/357: * admin/archive-contents.el (archive--insert-repolinks): Fix further, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin aa346f0 290/357: * GNUmakefile (org-fetch): Use https and stick to wget, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin d58576c 301/357: * GNUmakefile (FILTER-nonsrc): Don't compile .dir-locals.el files., Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 059dde5 344/357: * GNUmakefile (RULE-singlepkg): Add rules to install&compile each package, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin d5c6272 339/357: * admin/archive-contents.el: foo.tar.sig is not an old tarball, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 221c427 350/357: * admin/archive-contents.el: Improve handling of snapshot version numbers, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 040972d 342/357: * README.org: Describe how to build the archive and add a package, Stefan Monnier, 2020/12/10
- [elpa] elpa-admin 1ddc741 347/357: * README.org: Prefer org syntax and prepare for export., Stefan Monnier, 2020/12/10