From 89e0bf4ecafc6bffd76074d81d82a40c3d2aedec Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Mon, 4 Jun 2018 14:05:29 +0300 Subject: [PATCH] show build number in profile --- src/status_im/ui/screens/profile/subs.cljs | 2 +- src/status_im/utils/build.clj | 5 +++++ src/status_im/utils/build.cljs | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/status_im/ui/screens/profile/subs.cljs b/src/status_im/ui/screens/profile/subs.cljs index c3df9e0f8d..bcd38244db 100644 --- a/src/status_im/ui/screens/profile/subs.cljs +++ b/src/status_im/ui/screens/profile/subs.cljs @@ -12,4 +12,4 @@ (reg-sub :get-app-version (fn [{:keys [web3-node-version]}] - (str build/version " (" (or web3-node-version "N/A") ")"))) \ No newline at end of file + (str build/version " (" build/build-no ")\nnode " (or web3-node-version "N/A") ""))) diff --git a/src/status_im/utils/build.clj b/src/status_im/utils/build.clj index d309dcdb55..fb9c345f7c 100644 --- a/src/status_im/utils/build.clj +++ b/src/status_im/utils/build.clj @@ -21,6 +21,11 @@ (println (analyzer/message env (str "\u001B[31mWARNING\u001B[0m: " s)))) (System/exit 1)))) +(defmacro get-build-no [] + (-> (shell/sh "bash" "-c" "sh ./scripts/build_no.sh") + :out + (string/replace "\n" ""))) + (defmacro git-short-version [] (let [version-file-path "VERSION" version-file (io/file version-file-path)] diff --git a/src/status_im/utils/build.cljs b/src/status_im/utils/build.cljs index 92dfc87458..ac7de34cfe 100644 --- a/src/status_im/utils/build.cljs +++ b/src/status_im/utils/build.cljs @@ -1,4 +1,5 @@ (ns status-im.utils.build - (:require-macros [status-im.utils.build :refer [git-short-version]])) + (:require-macros [status-im.utils.build :as build])) -(def version (git-short-version)) +(def version (build/git-short-version)) +(def build-no (build/get-build-no))