Skip to content

Commit d7dae45

Browse files
authored
Merge pull request #2 from ghaskins/add-package-file
[gitlab-download] Add support for 'package-file' option
2 parents a2b149b + 569dce9 commit d7dae45

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/manetu/gitlab/download/generic_package.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@
3535
(some? (re-find (re-pattern (str "^" prefix)) s))))
3636

3737
(defn- open-download
38-
[{:keys [package-name] :as options} version]
39-
(let [url (str gitlab/gitlab-api-base (compute-api-prefix options) "/generic/" package-name "/" version "/" package-name ".tgz")]
38+
[{:keys [package-name package-file] :as options} version]
39+
(let [package-file (or package-file (str package-name ".tgz"))
40+
url (str gitlab/gitlab-api-base (compute-api-prefix options) "/generic/" package-name "/" version "/" package-file)]
4041
(log/debug "url:" url)
4142
(:body
4243
(curl/get url {:headers {"PRIVATE-TOKEN" gitlab/gitlab-token}

0 commit comments

Comments
 (0)