diff options
| -rw-r--r-- | doc/guix.texi | 4 | ||||
| -rw-r--r-- | guix/import/git.scm | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 30c91d0df9d..17d4bdd23a8 100644 --- a/doc/guix.texi +++ b/doc/guix.texi | |||
| @@ -16124,6 +16124,10 @@ the tag name for separating the numbers of the version. | |||
| 16124 | pre-releases; to make it also look for pre-releases, set the this | 16124 | pre-releases; to make it also look for pre-releases, set the this |
| 16125 | property to @code{#t}. | 16125 | property to @code{#t}. |
| 16126 | 16126 | ||
| 16127 | @item @code{stable-version-regexp}: a regular expression for matching the | ||
| 16128 | version string, if specified the updater will pick the latest version from | ||
| 16129 | matching ones when the @option{--target-version} option is omitted. | ||
| 16130 | |||
| 16127 | @end itemize | 16131 | @end itemize |
| 16128 | 16132 | ||
| 16129 | @lisp | 16133 | @lisp |
diff --git a/guix/import/git.scm b/guix/import/git.scm index 8d443895cf1..81ea9b73988 100644 --- a/guix/import/git.scm +++ b/guix/import/git.scm | |||
| @@ -206,7 +206,14 @@ a version prefix when PARTIAL-VERSION? is #t." | |||
| 206 | (old-reference (origin-uri (package-source package))) | 206 | (old-reference (origin-uri (package-source package))) |
| 207 | (tags (get-package-tags package)) | 207 | (tags (get-package-tags package)) |
| 208 | (versions (map car tags)) | 208 | (versions (map car tags)) |
| 209 | (version (find-version versions version partial-version?)) | 209 | (stable-rx (and=> (assq-ref (package-properties package) |
| 210 | 'stable-version-regexp) | ||
| 211 | make-regexp)) | ||
| 212 | (version (find-version | ||
| 213 | (if (and stable-rx (not version)) | ||
| 214 | (filter (cut regexp-exec stable-rx <>) versions) | ||
| 215 | versions) | ||
| 216 | version partial-version?)) | ||
| 210 | (tag (assoc-ref tags version))) | 217 | (tag (assoc-ref tags version))) |
| 211 | (and version | 218 | (and version |
| 212 | (upstream-source | 219 | (upstream-source |
