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

Don't barf if ./bin/version doesn't work during dev

parent 034693a4
No related branches found
No related tags found
No related merge requests found
......@@ -60,8 +60,12 @@
;; Metabase version is of the format `GIT-TAG (GIT-SHORT-HASH GIT-BRANCH)`
(defn- version-info-from-shell-script []
(let [[tag hash branch date] (-> (shell/sh "./bin/version") :out s/trim (s/split #" "))]
{:tag tag, :hash hash, :branch branch, :date date}))
(try
(let [[tag hash branch date] (-> (shell/sh "./bin/version") :out s/trim (s/split #" "))]
{:tag tag, :hash hash, :branch branch, :date date})
;; if ./bin/version fails (e.g., if we are developing on Windows) just return something so the whole thing doesn't barf
(catch Throwable _
{:tag "?", :hash "?", :branch "?", :date "?"})))
(defn- version-info-from-properties-file []
(when-let [props-file (io/resource "version.properties")]
......
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