This commit is contained in:
Michiel Borkent 2021-12-26 23:24:48 +01:00
parent 8abf58112e
commit 8c770b41ac
2 changed files with 12 additions and 6 deletions

View file

@ -109,7 +109,14 @@ case "$platform-$static_binary" in
;;
esac
download_url="https://github.com/babashka/babashka/releases/download/v$version/$filename"
if [[ "$version" == *-SNAPSHOT ]]
then
repo="babashka-dev-builds"
else
repo="babashka"
fi
download_url="https://github.com/babashka/$repo/releases/download/v$version/$filename"
# macOS only have shasum available by default
# Some Linux distros (RHEL-like) only have sha256sum avaiable by default (others have both)

View file

@ -11,14 +11,13 @@
:out
str/trim)))
(defn current-version []
(-> (slurp "resources/BABASHKA_VERSION")
str/trim))
(defn release [& args]
(let [ght (System/getenv "GITHUB_TOKEN")
file (first args)
branch (current-branch)]
branch (current-branch)
current-version
(-> (slurp "resources/BABASHKA_VERSION")
str/trim)]
(if (and ght (contains? #{"master" "main"} branch))
(do (assert file "File name must be provided")
(ghr/overwrite-asset {:org "babashka"