From 3706f559c19523c35dfd55ebd5a0832b5dcf03cf Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Wed, 30 Dec 2020 23:18:15 +0300 Subject: [PATCH] Pull request: scripts: fix Dockerfile, build-release.sh Merge in DNS/adguard-home from 2276-fix-release-2 to master Updates #2276. Squashed commit of the following: commit cc7edffca6862579a745600b4008428d4c9a73d9 Author: Ainar Garipov Date: Wed Dec 30 22:56:01 2020 +0300 scripts: fix Dockerfile, build-release.sh --- scripts/make/Dockerfile | 2 +- scripts/make/build-release.sh | 25 +++++++++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/scripts/make/Dockerfile b/scripts/make/Dockerfile index 8494e7a5..7e9bec86 100644 --- a/scripts/make/Dockerfile +++ b/scripts/make/Dockerfile @@ -45,5 +45,5 @@ CMD [ \ "--no-check-update", \ "-c", "/opt/adguardhome/conf/AdGuardHome.yaml", \ "-h", "0.0.0.0", \ - "-w", "/opt/adguardhome/work", \ + "-w", "/opt/adguardhome/work" \ ] diff --git a/scripts/make/build-release.sh b/scripts/make/build-release.sh index 848da099..bad82e89 100644 --- a/scripts/make/build-release.sh +++ b/scripts/make/build-release.sh @@ -92,6 +92,9 @@ readonly arms='5 readonly mipses='softfloat' +# TODO(a.garipov): Remove armv6, because it was always overwritten by +# armv7. Rename armv7 to armhf. Rename the 386 snap to i386. + # os arch arm mips snap readonly platforms="\ darwin 386 0 0 0 @@ -102,11 +105,11 @@ freebsd arm 5 0 0 freebsd arm 6 0 0 freebsd arm 7 0 0 freebsd arm64 0 0 0 -linux 386 0 0 i386 +linux 386 0 0 386 linux amd64 0 0 amd64 linux arm 5 0 0 -linux arm 6 0 0 -linux arm 7 0 armhf +linux arm 6 0 armv6 +linux arm 7 0 armv7 linux arm64 0 0 arm64 linux mips 0 softfloat 0 linux mips64 0 softfloat 0 @@ -209,9 +212,23 @@ build() { cp -r './scripts/snap/gui'\ "${build_snap_dir}/meta/" + # TODO(a.garipov): Remove this crutch later. + case "$build_snap" + in + ('386') + build_snap_arch="i386" + ;; + ('armv6'|'armv7') + build_snap_arch="armhf" + ;; + (*) + build_snap_arch="$build_snap" + ;; + esac + # Create a snap.yaml file, setting the values. sed -e 's/%VERSION%/'"$version"'/'\ - -e 's/%ARCH%/'"$build_snap"'/'\ + -e 's/%ARCH%/'"$build_snap_arch"'/'\ ./scripts/snap/snap.tmpl.yaml\ >"${build_snap_dir}/meta/snap.yaml"