Skip to content

Commit

Permalink
allow specifying a tag/revision for manifest dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dunn committed Jun 12, 2017
1 parent 5a1dca6 commit f544b4c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/packages.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@
(error "---X Package \"~S\" is not in the manifest; please provide a URL"
(gethash "name" p)))
(make-manifest-dependency :name (gethash "name" p)
:download-strategy (download-strategy (manifest-package-url man))
:url (manifest-package-url man)
:download-strategy (download-strategy (manifest-package-url man)))))
:version (or (gethash "tag" p)
(gethash "revision" p)
(gethash "version" p)))))
;; Dependency has a tarball URL
((is-tar-url? (gethash "url" p))
(make-http-dependency :name (gethash "name" p)
Expand Down
5 changes: 4 additions & 1 deletion t/integrations_test.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ run from the command-line."
(setf qi::+project-name+ nil)
(setf qi.manifest::+manifest-packages+ nil))

(plan 6)
(plan 11)

;;
;; Test that the VERSION key works for tarball dependencies
Expand Down Expand Up @@ -53,6 +53,9 @@ run from the command-line."
(gsub "t/resources/git-project/qi.yaml" "s/0\.0\.1/0.0.2/g")
(ok (qi:install :test-git) "test-git is re-installed")
(is (test-git:main) "0.0.2" "qi should load the newer version of cl-test-1")
(is "85f82ed88d5fa6e63026038dbb1dad0d6cd5dafe"
(first (qi.util:run-git-command "rev-parse HEAD" #P"t/resources/git-project/.dependencies/packages/alexandria--git"))
"The correct revision for alexandria is checked out")
(reset-metadata)

;; Revert
Expand Down
5 changes: 5 additions & 0 deletions t/resources/git-project/qi.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: test-git
packages:
# This is to test Git dependencies without a master branch
- name: yason

- name: alexandria
revision: 85f82ed88d5fa6e63026038dbb1dad0d6cd5dafe

- name: cl-test-1
url: 'https://gitlab.com/welp/cl-test-1.git'
tag: 0.0.1

0 comments on commit f544b4c

Please sign in to comment.