Pull request: 2546 updater fix
Merge in DNS/adguard-home from 2546-updater-fix to master Closes #2546. Squashed commit of the following: commit af243c9fad710efe099506fda281e628c3e5ec30 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Jan 13 14:33:37 2021 +0300 updater: fix go 1.14 compat commit 742fba24b300ce51c04acb586996c3c75e56ea20 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Jan 13 13:58:27 2021 +0300 util: imp error check commit c2bdbce8af657a7f4b7e05c018cfacba86e06753 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Jan 11 18:51:26 2021 +0300 all: fix and refactor update checking
This commit is contained in:
@@ -319,6 +319,17 @@ echo "{
|
||||
\"selfupdate_min_version\": \"0.0\",
|
||||
" >> "$version_json"
|
||||
|
||||
# Add the old object keys for compatibility with pre-v0.105.0 MIPS that
|
||||
# did not mention the softfloat variant.
|
||||
#
|
||||
# TODO(a.garipov): Remove this around the time we hit v0.107.0.
|
||||
echo "
|
||||
\"download_linux_mips\": \"${version_download_url}/AdGuardHome_linux_mips_softfloat.tar.gz\",
|
||||
\"download_linux_mipsle\": \"${version_download_url}/AdGuardHome_linux_mipsle_softfloat.tar.gz\",
|
||||
\"download_linux_mips64\": \"${version_download_url}/AdGuardHome_linux_mips64_softfloat.tar.gz\",
|
||||
\"download_linux_mips64le\": \"${version_download_url}/AdGuardHome_linux_mips64le_softfloat.tar.gz\",
|
||||
" >> "$version_json"
|
||||
|
||||
(
|
||||
# Use +f here so that ls works and we don't need to use find.
|
||||
set +f
|
||||
|
||||
@@ -54,17 +54,18 @@ esac
|
||||
# TODO(a.garipov): Additional validation?
|
||||
version="$VERSION"
|
||||
|
||||
# Set the linker flags accordingly: set the channel and the versio as
|
||||
# well as goarm and gomips variable values, if the variables are set and
|
||||
# are not empty.
|
||||
ldflags="-s -w -X main.version=${version}"
|
||||
ldflags="${ldflags} -X main.channel=${channel}"
|
||||
# Set the linker flags accordingly: set the realease channel and the
|
||||
# current version as well as goarm and gomips variable values, if the
|
||||
# variables are set and are not empty.
|
||||
readonly version_pkg='github.com/AdguardTeam/AdGuardHome/internal/version'
|
||||
ldflags="-s -w -X ${version_pkg}.version=${version}"
|
||||
ldflags="${ldflags} -X ${version_pkg}.channel=${channel}"
|
||||
if [ "${GOARM:-}" != '' ]
|
||||
then
|
||||
ldflags="${ldflags} -X main.goarm=${GOARM}"
|
||||
ldflags="${ldflags} -X ${version_pkg}.goarm=${GOARM}"
|
||||
elif [ "${GOMIPS:-}" != '' ]
|
||||
then
|
||||
ldflags="${ldflags} -X main.gomips=${GOMIPS}"
|
||||
ldflags="${ldflags} -X ${version_pkg}.gomips=${GOMIPS}"
|
||||
fi
|
||||
|
||||
# Allow users to limit the build's parallelism.
|
||||
|
||||
Reference in New Issue
Block a user