summarylogtreecommitdiffstats
path: root/version.patch
blob: 5979ad8f42a583ee0b4a0801d30ad3ea56ea35aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
--- pi-hole-4.0.a/advanced/Scripts/version.sh	2018-08-05 19:40:22.000000000 +0200
+++ pi-hole-4.0/advanced/Scripts/version.sh	2018-08-24 15:28:44.141363877 +0200
@@ -20,42 +20,16 @@
         return 0
     fi
 
-    # Get the tagged version of the local repository
-    local directory="${1}"
-    local version
-
-    cd "${directory}" 2> /dev/null || { echo "${DEFAULT}"; return 1; }
-    version=$(git describe --tags --always || echo "$DEFAULT")
-    if [[ "${version}" =~ ^v ]]; then
-        echo "${version}"
-    elif [[ "${version}" == "${DEFAULT}" ]]; then
-        echo "ERROR"
-        return 1
+    if [[ "$1" == "pi-hole" ]]; then
+        echo "{{corever}}"
     else
-        echo "Untagged"
+        echo "{{webver}}"
     fi
     return 0
 }
 
 getLocalHash() {
-    # Local FTL hash does not exist on filesystem
-    if [[ "$1" == "FTL" ]]; then
-        echo "N/A"
-        return 0
-    fi
-
-    # Get the short hash of the local repository
-    local directory="${1}"
-    local hash
-
-    cd "${directory}" 2> /dev/null || { echo "${DEFAULT}"; return 1; }
-    hash=$(git rev-parse --short HEAD || echo "$DEFAULT")
-    if [[ "${hash}" == "${DEFAULT}" ]]; then
-        echo "ERROR"
-        return 1
-    else
-        echo "${hash}"
-    fi
+    echo "N/A"
     return 0
 }