chore: reduce build context

This commit is contained in:
andig 2022-10-17 18:53:15 +02:00
parent 43d4221cf9
commit 05c76ceaad
3 changed files with 10 additions and 6 deletions

View file

@ -3,10 +3,14 @@
.vscode
*.conf
*.Dockerfile
*.image
*.json
*.sh
*.yaml
Dockerfile
evcc
evcc.exe
builddir
node_modules
release
!entrypoint.sh

4
.gitignore vendored
View file

@ -14,9 +14,9 @@ __debug_bin
evcc
evcc.exe
evcc_*
flags/*
buildflags/*
linux-*.Dockerfile
builddir
flags
node_modules
release
*.inc

View file

@ -19,7 +19,7 @@ PLATFORM := linux/amd64,linux/arm64,linux/arm/v6
# gokrazy image
IMAGE_FILE := evcc_$(TAG_NAME).image
IMAGE_ROOTFS := evcc_$(TAG_NAME).rootfs
IMAGE_OPTIONS := -hostname evcc -http_port 8080 github.com/gokrazy/serial-busybox github.com/gokrazy/breakglass github.com/evcc-io/evcc
IMAGE_OPTIONS := -hostname evcc -http_port 8080 github.com/gokrazy/serial-busybox github.com/gokrazy/breakglass github.com/gokrazy/wifi github.com/evcc-io/evcc
# deb
PACKAGES = ./release
@ -106,16 +106,16 @@ apt-release::
# gokrazy image
prepare-image::
go install github.com/gokrazy/tools/cmd/gokr-packer@latest
go install github.com/gokrazy/tools/cmd/gokr-packer@main
mkdir -p flags/github.com/gokrazy/breakglass
echo "-forward=private-network" > flags/github.com/gokrazy/breakglass/flags.txt
mkdir -p buildflags/github.com/evcc-io/evcc
echo "$(BUILD_TAGS),gokrazy" > buildflags/github.com/evcc-io/evcc/buildflags.txt
echo "$(BUILD_ARGS)" >> buildflags/github.com/evcc-io/evcc/buildflags.txt
echo "-ldflags=$(LD_FLAGS)" >> buildflags/github.com/evcc-io/evcc/buildflags.txt
image::
gokr-packer -overwrite=$(IMAGE_FILE) -target_storage_bytes=1258299392 $(IMAGE_OPTIONS)
loop=$$(sudo losetup --find --show -P $(IMAGE_FILE)); sudo mkfs.ext4 $${loop}p4
loop=$$(losetup --find --show -P $(IMAGE_FILE)); mkfs.ext4 $${loop}p4
gzip -f $(IMAGE_FILE)
image-rootfs::