Skip to content

Commit

Permalink
Pull request: scripts: fix Dockerfile, build-release.sh
Browse files Browse the repository at this point in the history
Merge in DNS/adguard-home from 2276-fix-release-2 to master

Updates #2276.

Squashed commit of the following:

commit cc7edff
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Dec 30 22:56:01 2020 +0300

    scripts: fix Dockerfile, build-release.sh
  • Loading branch information
ainar-g committed Dec 30, 2020
1 parent e20e94d commit 3706f55
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/make/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
]
25 changes: 21 additions & 4 deletions scripts/make/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit 3706f55

Please sign in to comment.