+ release.sh: add armv5 build
Close #1239 Squashed commit of the following: commit 707e2f8e265e294c7b1328c375648f799a5ae293 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jan 10 16:32:52 2020 +0300 leave "AdGuardHome_linux_arm" by default commit cca01fd03200e70d6ee2201540570382f2b7fdf4 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jan 10 14:53:37 2020 +0300 fix auto-update; update readme commit f393a4f511861ef1998c68775bb8f234c5ce1838 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jan 10 13:00:37 2020 +0300 + release.sh: add armv5 build; rename armv6 build commit 73f2d20ba6b0a94a9929882fe15175ba80b528d7 Author: Simon Zolin <s.zolin@adguard.com> Date: Fri Jan 10 12:59:55 2020 +0300 * release.sh: fix indentation
This commit is contained in:
@@ -42,7 +42,11 @@ func getVersionResp(data []byte) []byte {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
_, ok := versionJSON[fmt.Sprintf("download_%s_%s", runtime.GOOS, runtime.GOARCH)]
|
||||
dloadName := fmt.Sprintf("download_%s_%s", runtime.GOOS, runtime.GOARCH)
|
||||
if runtime.GOARCH == "arm" && ARMVersion != "6" {
|
||||
dloadName = fmt.Sprintf("download_%s_%sv%s", runtime.GOOS, runtime.GOARCH, ARMVersion)
|
||||
}
|
||||
_, ok := versionJSON[dloadName]
|
||||
if ok && ret["new_version"] != versionString && versionString >= selfUpdateMinVersion {
|
||||
ret["can_autoupdate"] = true
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ var (
|
||||
versionString string
|
||||
updateChannel string
|
||||
versionCheckURL string
|
||||
ARMVersion string
|
||||
)
|
||||
|
||||
const versionCheckPeriod = time.Hour * 8
|
||||
@@ -64,10 +65,11 @@ type homeContext struct {
|
||||
var Context homeContext
|
||||
|
||||
// Main is the entry point
|
||||
func Main(version string, channel string) {
|
||||
func Main(version string, channel string, armVer string) {
|
||||
// Init update-related global variables
|
||||
versionString = version
|
||||
updateChannel = channel
|
||||
ARMVersion = armVer
|
||||
versionCheckURL = "https://static.adguard.com/adguardhome/" + updateChannel + "/version.json"
|
||||
|
||||
// config can be specified, which reads options from there, but other command line flags have to override config values
|
||||
|
||||
Reference in New Issue
Block a user