diff --git a/HACKING.md b/HACKING.md index 750e5f47c20..abfa86e8f27 100644 --- a/HACKING.md +++ b/HACKING.md @@ -19,8 +19,9 @@ The rules are mostly sorted in the alphabetical order. pkg: fix the network error logging issue ``` - Where `pkg` is the package where most changes took place. If there are - several such packages, or the change is top-level only, write `all`. + Where `pkg` is the directory or Go package (without the `internal/` part) + where most changes took place. If there are several such packages, or the + change is top-level only, write `all`. * Keep your commit messages, including headers, to eighty (**80**) columns. diff --git a/README.md b/README.md index f09da329813..e694452fea0 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ AdGuard Home is a network-wide software for blocking ads & tracking. After you set it up, it'll cover ALL your home devices, and you don't need any client-side software for that. -It operates as a DNS server that re-routes tracking domains to a "black hole," thus preventing your devices from connecting to those servers. It's based on software we use for our public [AdGuard DNS](https://adguard.com/en/adguard-dns/overview.html) servers -- both share a lot of common code. +It operates as a DNS server that re-routes tracking domains to a "black hole", thus preventing your devices from connecting to those servers. It's based on software we use for our public [AdGuard DNS](https://adguard.com/en/adguard-dns/overview.html) servers -- both share a lot of common code. * [Getting Started](#getting-started) * [Comparing AdGuard Home to other solutions](#comparison) @@ -170,7 +170,8 @@ You will need this to build AdGuard Home: * [go](https://golang.org/dl/) v1.14 or later. * [node.js](https://nodejs.org/en/download/) v10.16.2 or later. - * [npm](https://www.npmjs.com/) v6.14 or later. + * [npm](https://www.npmjs.com/) v6.14 or later (temporary requirement, TODO: remove when redesign is finished). + * [yarn](https://yarnpkg.com/) v1.22.5 or later. ### Building diff --git a/internal/home/config.go b/internal/home/config.go index 92b2326c4b8..840678d4e1b 100644 --- a/internal/home/config.go +++ b/internal/home/config.go @@ -177,7 +177,7 @@ func initConfig() { config.DHCP.Conf4.ICMPTimeout = 1000 config.DHCP.Conf6.LeaseDuration = 86400 - if updateChannel == "none" || updateChannel == "edge" { + if updateChannel == "none" || updateChannel == "edge" || updateChannel == "development" { config.BetaBindPort = 3001 } } diff --git a/internal/home/controlinstall.go b/internal/home/controlinstall.go index 3920af3c4dd..7d67d140fd6 100644 --- a/internal/home/controlinstall.go +++ b/internal/home/controlinstall.go @@ -371,9 +371,11 @@ func (web *Web) handleInstallConfigure(w http.ResponseWriter, r *http.Request) { go func() { _ = web.httpServer.Shutdown(context.TODO()) }() - go func() { - _ = web.httpServerBeta.Shutdown(context.TODO()) - }() + if web.httpServerBeta != nil { + go func() { + _ = web.httpServerBeta.Shutdown(context.TODO()) + }() + } } } diff --git a/openapi/openapi.yaml b/openapi/openapi.yaml index ab1eac6959e..751eb0730ec 100644 --- a/openapi/openapi.yaml +++ b/openapi/openapi.yaml @@ -2324,7 +2324,7 @@ 'type': 'object' 'description': 'Login request data' 'properties': - 'username': + 'name': 'type': 'string' 'description': 'User name' 'password': diff --git a/scripts/make/build-release.sh b/scripts/make/build-release.sh index 36dae35bcb9..4be4561610a 100644 --- a/scripts/make/build-release.sh +++ b/scripts/make/build-release.sh @@ -184,8 +184,8 @@ build() { case "$build_os" in ('darwin'|'windows') - build_archive="./${dist}/${build_ar}.zip" - zip -9 -q "$build_archive" "$build_dir" + build_archive="${PWD}/${dist}/${build_ar}.zip" + ( cd "${dist}/${1}" && zip -9 -q -r "$build_archive" "./AdGuardHome" ) ;; (*) build_archive="./${dist}/${build_ar}.tar.gz" @@ -349,7 +349,7 @@ echo "{ echo " \"download_${platform}\": \"${version_download_url}/${filename}\"," >> "$version_json" fi - : "$(( i++ ))" + i="$(( i + 1 ))" done ) diff --git a/scripts/make/go-lint.sh b/scripts/make/go-lint.sh index 22a576166c4..417b6b57b0f 100644 --- a/scripts/make/go-lint.sh +++ b/scripts/make/go-lint.sh @@ -116,10 +116,12 @@ nilness ./... # shadow --strict ./... # TODO(a.garipov): Enable errcheck fully after handling all errors, -# including the deferred ones, properly. Also, perhaps, enable --blank. +# including the deferred and generated ones, properly. Also, perhaps, +# enable --blank. +# # errcheck ./... exit_on_output sh -c ' - errcheck --asserts ./... |\ + errcheck --asserts --ignoregenerated ./... |\ { grep -e "defer" -e "_test\.go:" -v || exit 0; } '