From 8abf58112e12a64547566db41a33cad4df70a66d Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 26 Dec 2021 23:11:58 +0100 Subject: [PATCH] Publish dev release --- .build/bb.edn | 2 +- script/babashka/release_artifact.clj | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.build/bb.edn b/.build/bb.edn index 308cad8c..b68f2790 100644 --- a/.build/bb.edn +++ b/.build/bb.edn @@ -2,5 +2,5 @@ :deps {borkdude/gh-release-artifact #_{:local/root "../gh-release-artifact"} {:git/url "https://github.com/borkdude/gh-release-artifact" - :sha "20ad5cf8fc58635944889b7c0fc38a8bc32f9f99"}} + :sha "f34f3e382e6a0ef7f52748b2f27eb681f799a822"}} :tasks {release-artifact babashka.release-artifact/release}} diff --git a/script/babashka/release_artifact.clj b/script/babashka/release_artifact.clj index cbff7c36..f36b30b2 100644 --- a/script/babashka/release_artifact.clj +++ b/script/babashka/release_artifact.clj @@ -11,10 +11,12 @@ :out str/trim))) +(defn current-version [] + (-> (slurp "resources/BABASHKA_VERSION") + str/trim)) + (defn release [& args] - (let [current-version (-> (slurp "resources/BABASHKA_VERSION") - str/trim) - ght (System/getenv "GITHUB_TOKEN") + (let [ght (System/getenv "GITHUB_TOKEN") file (first args) branch (current-branch)] (if (and ght (contains? #{"master" "main"} branch)) @@ -28,6 +30,9 @@ :repo "babashka-dev-builds" :file file :tag (str "v" current-version) - :draft false})) + ;; do not set, because we are posting to another repo + :target-commitish false + :draft false + :prerelease true})) (println "Skipping release artifact (no GITHUB_TOKEN or not on main branch)")) nil))