Skip to content
Snippets Groups Projects
Commit fe96328c authored by Cam Saul's avatar Cam Saul
Browse files

Build script tweaks

parent 041ea0ab
No related branches found
No related tags found
No related merge requests found
(ns release.heroku
"Code related to updating the Heroku build pack."
(:require [metabuild-common.core :as u]
[release.common :as c]
[release.common.git :as git]))
[release.common :as c]))
(def ^:private heroku-repo "metabase/metabase-buildpack")
......@@ -36,5 +35,13 @@
(spit version-file (str (c/version) "\n"))
(when-not (zero? (:exit (u/sh* {:dir dir} "git" "commit" "-am" (format "v%s" (c/version)))))
(u/announce "Nothing to update")))
(git/recreate-and-push-tag! dir (c/version))
(u/step "Delete old tags"
(try
(u/sh {:dir dir} "git" "push" "--delete" "origin" (c/version))
(catch Throwable _
(u/announce "Nothing to delete."))))
(u/step "Push updated tag"
(u/sh {:dir dir} "git" "tag" (c/version))
(u/sh {:dir dir} "git" "push")
(u/sh {:dir dir} "git" "push" "--tags" "origin" "master"))
(validate-heroku-buildpack)))))
......@@ -3,8 +3,7 @@
[clojure.string :as str]
[metabuild-common.core :as u]
[net.cgrand.tagsoup :as tagsoup]
[release.common :as c]
[release.common.git :as git]))
[release.common :as c]))
(def ^:private website-git-repo
"metabase/metabase.github.io")
......@@ -26,7 +25,12 @@
(u/step "Commit updated docs"
(u/sh {:dir dir} "git" "add" ".")
(u/sh* {:dir dir} "git" "commit" "-m" tag))
(git/recreate-and-push-tag! dir tag)))
(u/step "delete old tags"
(u/sh* {:dir dir} "git" "push" "--delete" "origin" tag)
(u/sh* {:dir dir} "git" "tag" "--delete" "origin" tag))
(u/step "tag it"
(u/sh {:dir dir} "git" "tag" "-a" tag "-m" tag)
(u/sh {:dir dir} "git" "push" "--follow-tags" "-u" "origin" website-branch))))
(defn- parse-html-from-url [url]
(let [{:keys [status ^String body]} (http/get url)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment