Skip to content

Commit

Permalink
Remove "-melpa" from some symbol names
Browse files Browse the repository at this point in the history
For users of this library that aren't MELPA, that string is incorrect.
And for us it just needlessly makes the names longer, without any real
benefit.

Keep the name `package-build--melpa-base' because renaming that would
be more likely to cause breakage and, because it usually does refer
to the MELPA repository, even when used by something other than MELPA.
  • Loading branch information
tarsius committed Jun 1, 2023
1 parent 6223cae commit 4381b1d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions package-build-badges.el
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
(defvar package-build-stable)
(defvar package-build-badge-data)

(defun package-build--write-melpa-badge-image ( name version target-dir
&optional archive color)
(defun package-build--write-badge-image ( name version target-dir
&optional archive color)
"Make badge svg file.
This is essentially a copy of `elpaa--make-badge'."
(let* ((file (expand-file-name (concat name "-badge.svg") target-dir))
Expand Down
15 changes: 9 additions & 6 deletions package-build.el
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,11 @@ similar, which will provide the GNU timeout program as
"Type of `package-build-tar-executable'.
Can be `gnu' or `bsd'; nil means the type is not decided yet.")

(defcustom package-build-write-melpa-badge-images nil
"When non-nil, write MELPA badge images alongside packages.
(define-obsolete-variable-alias 'package-build-write-badge-images
'package-build-write-badge-images "Package-Build 5.0.0")

(defcustom package-build-write-badge-images nil
"When non-nil, write badge images alongside packages.
These badges can, for example, be used on GitHub pages."
:group 'package-build
:type 'boolean)
Expand All @@ -183,8 +186,8 @@ These badges can, for example, be used on GitHub pages."
(list "melpa" "#922793"))
"Data used when generating badge images.
The default value is set based on `package-build-stable'.
`package-build-write-melpa-badge-images' controls whether
images are generated."
`package-build-write-badge-images' controls whether images
are generated."
:group 'package-build
:type '(list (string :tag "Archive name") color))

Expand Down Expand Up @@ -955,8 +958,8 @@ in `package-build-archive-dir'."
(package-build--build-single-file-package rcp files))
(t
(package-build--build-multi-file-package rcp files)))
(when package-build-write-melpa-badge-images
(package-build--write-melpa-badge-image
(when package-build-write-badge-images
(package-build--write-badge-image
(oref rcp name) (oref rcp version) package-build-archive-dir))))
(funcall package-build-cleanup-function rcp))))

Expand Down

0 comments on commit 4381b1d

Please sign in to comment.