Tweak release script
This commit is contained in:
parent
73306079ec
commit
6960bc5d24
1 changed files with 3 additions and 0 deletions
|
|
@ -7,12 +7,14 @@
|
|||
(or (System/getenv "APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH")
|
||||
(System/getenv "APPVEYOR_REPO_BRANCH")
|
||||
(System/getenv "CIRCLE_BRANCH")
|
||||
(System/getenv "GITHUB_REF_NAME")
|
||||
(-> (sh "git" "rev-parse" "--abbrev-ref" "HEAD")
|
||||
:out
|
||||
str/trim)))
|
||||
|
||||
(defn release [& args]
|
||||
(let [ght (System/getenv "GITHUB_TOKEN")
|
||||
_ (println "Github token found")
|
||||
file (first args)
|
||||
branch (current-branch)
|
||||
current-version
|
||||
|
|
@ -20,6 +22,7 @@
|
|||
str/trim)]
|
||||
(if (and ght (contains? #{"master" "main"} branch))
|
||||
(do (assert file "File name must be provided")
|
||||
(println "On main branch. Publishing asset.")
|
||||
(ghr/overwrite-asset {:org "babashka"
|
||||
:repo "babashka"
|
||||
:file file
|
||||
|
|
|
|||
Loading…
Reference in a new issue