emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] elpa-admin fe8ed78ebd: Add support for rolling-release packages


From: Philip Kaludercic
Subject: [elpa] elpa-admin fe8ed78ebd: Add support for rolling-release packages
Date: Wed, 26 Oct 2022 15:08:58 -0400 (EDT)

branch: elpa-admin
commit fe8ed78ebd69ac86d342fe79d7783f2fe032691f
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Add support for rolling-release packages
    
    * README: Document :rolling-release
    * elpa-admin.el (elpaa--get-release-revision): Respect
    :rolling-release.
    (elpaa--make-one-package): Respect :rolling-release.
---
 README        |  8 ++++++++
 elpa-admin.el | 10 +++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/README b/README
index dcf3647142..712a20cfaa 100644
--- a/README
+++ b/README
@@ -186,6 +186,14 @@ This option has many shortcomings, so its use is 
discouraged: it is
 better avoided as much as possible.  Among other problems,  merges
 don't interact well with the algorithm used to determine which
 revision is a "release".
+** =:rolling-release FLAG=
+If FLAG is non-nil, a new package will be released for every new
+commit, instead of just on incrementing the "Version" header.  FLAG
+can optionally be a string, in which case the package is only released
+if the version is equal to FLAG.
+
+Note that the usage of this option is discouraged.  Only use it if the
+package maintainer explicitly wishes to use a "rolling release" model.
 
 * Configuration (elpa-config)
 
diff --git a/elpa-admin.el b/elpa-admin.el
index a5b29ac31f..81eb0b9f91 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -228,6 +228,7 @@ commit which modified the \"Version:\" pseudo header."
               (not (member vers (car version-map))))
     (pop version-map))
   (or (nth 2 (car version-map))
+      (and (elpaa--spec-get pkg-spec :rolling-release) "HEAD")
       ;; When the mainfile is a symlink (e.g. for :core packages), run Git
       ;; in the directory that holds the actual file, otherwise Git won't
       ;; know what file we're talking about.
@@ -971,7 +972,8 @@ place the resulting tarball into the file named 
TARBALL-ONLY."
                                          dir pkg-spec
                                          `(nil ,devel-vers
                                                . ,(nthcdr 2 metadata))
-                                         nil tarball-only))))
+                                         nil tarball-only)))
+             (rolling-release (elpaa--spec-get pkg-spec :rolling-release)))
 
         ;; Try and build the latest release tarball.
         (cond
@@ -1005,7 +1007,13 @@ place the resulting tarball into the file named 
TARBALL-ONLY."
                   ;; beneficial in case the `Maintainer:' was updated after
                   ;; the release commit, but it can probably bite us :-(
                   (elpaa--release-email pkg-spec metadata dir)))))))
+         ((and (stringp rolling-release)
+               (not (version= rolling-release vers)))
+          (elpaa--message "Expected version %s, but got %s for package %s!"
+                          rolling-release vers  pkgname))
          (t
+          (when rolling-release
+            (setq vers devel-vers))
           (let ((tarball (concat elpaa--release-subdir
                                  (format "%s-%s.tar" pkgname vers))))
             (when (elpaa--make-one-tarball



reply via email to

[Prev in Thread] Current Thread [Next in Thread]