mirror of
https://github.com/status-im/status-react.git
synced 2025-01-13 20:46:53 +00:00
[status-im#12603] Show short hash near build number in About page
Signed-off-by: andrey <motor4ik@gmail.com>
This commit is contained in:
parent
8f52b9b63c
commit
f0302e7cbf
@ -610,19 +610,19 @@
|
||||
(defn- node-version [web3-node-version]
|
||||
(or web3-node-version "N/A"))
|
||||
|
||||
(def app-short-version
|
||||
(let [version build/build-no]
|
||||
(str build/version " (" version ")")))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:get-app-version
|
||||
:<- [:web3-node-version]
|
||||
(fn [web3-node-version]
|
||||
(str app-short-version "; " (node-version web3-node-version))))
|
||||
(str build/app-short-version "; " (node-version web3-node-version))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:get-app-short-version
|
||||
(fn [_] app-short-version))
|
||||
(fn [_] build/app-short-version))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:get-commit-hash
|
||||
(fn [_] build/commit-hash))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:get-app-node-version
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
(views/defview about-app []
|
||||
(views/letsubs [app-version [:get-app-short-version]
|
||||
commit-hash [:get-commit-hash]
|
||||
node-version [:get-app-node-version]]
|
||||
[react/scroll-view
|
||||
[quo/list-item
|
||||
@ -35,6 +36,14 @@
|
||||
:title (i18n/label :t/version)
|
||||
:accessory :text
|
||||
:accessory-text app-version}]]
|
||||
[copyable-text/copyable-text-view
|
||||
{:copied-text commit-hash}
|
||||
[quo/list-item
|
||||
{:size :small
|
||||
:accessibility-label :commit-hash
|
||||
:title (i18n/label :t/app-commit)
|
||||
:accessory :text
|
||||
:accessory-text commit-hash}]]
|
||||
[copyable-text/copyable-text-view
|
||||
{:copied-text node-version}
|
||||
[quo/list-item
|
||||
|
@ -29,7 +29,7 @@
|
||||
(defmacro get-current-sha
|
||||
"fetches the latest commit sha from the current branch"
|
||||
[]
|
||||
(-> (shell/sh "git" "rev-parse" "--short" "HEAD")
|
||||
(-> (shell/sh "git" "rev-parse" "HEAD")
|
||||
:out
|
||||
(string/replace "\n" "")))
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
(ns status-im.utils.build
|
||||
(:require-macros [status-im.utils.build :as build]))
|
||||
|
||||
(def commit-hash (build/get-current-sha))
|
||||
(def version (build/git-short-version))
|
||||
(def build-no (build/get-build-no))
|
||||
|
||||
(def app-short-version
|
||||
(str version " (" build-no ")"))
|
||||
|
@ -1304,6 +1304,7 @@
|
||||
"validation-amount-invalid-number": "Amount is not a valid number",
|
||||
"validation-amount-is-too-precise": "Amount is too precise. Max number of decimals is {{decimals}}.",
|
||||
"version": "App version",
|
||||
"app-commit": "App commit",
|
||||
"view": "View",
|
||||
"view-cryptokitties": "View in CryptoKitties",
|
||||
"view-cryptostrikers": "View in CryptoStrikers",
|
||||
|
Loading…
x
Reference in New Issue
Block a user