Skip to content

Commit

Permalink
feat: Prevent update nil version
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Nov 30, 2024
1 parent 0a517ce commit e3a0b99
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/_prepare.el
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@
(defun get-latest-tag ()
"Return the latest tag (not including pre-release)."
(require 'github-tags)
(let* ((response (cdr (github-tags "cl-qob/cli")))
(tags (plist-get response :names))
(latest (nth 1 tags))) ; Skip the first one since it's the pre-release!
latest))
(if-let* ((repo "cl-qob/cli")
(response (cdr (github-tags repo)))
(tags (plist-get response :names))
(latest (nth 1 tags))) ; Skip the first one since it's the pre-release!
latest
(user-error "[ERROR] Latest tag not found in repository: %s" repo)))

;; Local Variables:
;; coding: utf-8
Expand Down

0 comments on commit e3a0b99

Please sign in to comment.