Skip to content

Commit

Permalink
[deploy] Link to diff from discord notification
Browse files Browse the repository at this point in the history
  • Loading branch information
plexus committed Jul 20, 2024
1 parent 81598b3 commit 4f2161e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ops/pre-receive.bb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

(def timeout 90)
(def service-name "compass")
(def gh-repo "https://github.com/GaiwanTeam/compass")
(def health-check-url "http://localhost:8080/health")
(def app-dir "/home/compass/app")
(def prep-cmd "true")
Expand Down Expand Up @@ -163,11 +164,11 @@
(str/join "\n"))
"> ```"))
(fatal "Health check failed"))
(do
(let [git-interval (str previous-git-sha ".." git-sha)]
(notify-discord
(str "> __**Deployed " sha "**__\n"
(str "> __**Deployed [" git-interval "](" gh-repo "/compare/" git-interval ")**__\n"
"> ```\n"
(->> (str/split (:out (sh/sh "git" "shortlog" (str previous-git-sha ".." git-sha))) #"\R")
(->> (str/split (:out (sh/sh "git" "shortlog" git-interval)) #"\R")
(map #(str "> " %))
(str/join "\n"))
"> ```"
Expand Down

0 comments on commit 4f2161e

Please sign in to comment.