Skip to content

Commit

Permalink
properly access file w/in classpath
Browse files Browse the repository at this point in the history
  • Loading branch information
invaliduser committed Jul 29, 2024
1 parent a9c01b6 commit ee70727
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/lrsql/init/git_data.clj
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
(ns lrsql.init.git-data
(:require [clojure.edn :as edn]
[clojure.string]
[clojure.java.shell :refer [sh]]))
[clojure.java.io :as io]
[clojure.java.shell :refer [sh]]
[clojure.string]))

(defn read-version []
(try (edn/read-string (slurp "lrsql/config/git-details.edn"))
(try (edn/read-string (slurp (io/resource "lrsql/config/git-details.edn")))
(catch Exception _
(try
(let [hash (:out (sh "git" "rev-parse" "HEAD"))]
Expand Down

0 comments on commit ee70727

Please sign in to comment.