Fix Docker (#450)
This commit is contained in:
@@ -2,7 +2,7 @@ FROM eclipse-temurin:11-jdk-jammy AS builder
|
|||||||
|
|
||||||
RUN set -ex && \
|
RUN set -ex && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y git python3 pip make && \
|
apt-get install -y git python3 pip make python3-venv && \
|
||||||
pip install --upgrade platformio && \
|
pip install --upgrade platformio && \
|
||||||
pip install --upgrade esptool
|
pip install --upgrade esptool
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
set -ex
|
set -ex
|
||||||
IMAGE_NAME=nuki_hub_build
|
IMAGE_NAME=nuki_hub_build
|
||||||
docker build -f ./Dockerfile -t ${IMAGE_NAME} ..
|
docker build -f ./Dockerfile -t ${IMAGE_NAME} ..
|
||||||
docker run --rm -it -v $PWD/..:/src -w /src ${IMAGE_NAME} make release
|
docker run --rm -it -v $PWD/..:/src -w /src ${IMAGE_NAME} /bin/bash -c "make deps && make updater && make release"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
set -ex
|
set -ex
|
||||||
IMAGE_NAME=nuki_hub_build
|
IMAGE_NAME=nuki_hub_build
|
||||||
docker build -f ./Dockerfile -t ${IMAGE_NAME} ..
|
docker build -f ./Dockerfile -t ${IMAGE_NAME} ..
|
||||||
docker run --rm -it -v $PWD/..:/src -w /src ${IMAGE_NAME} make debug
|
docker run --rm -it -v $PWD/..:/src -w /src ${IMAGE_NAME} /bin/bash -c "make deps && make updater && make debug"
|
||||||
4
Makefile
4
Makefile
@@ -2,6 +2,7 @@
|
|||||||
PLATFORMIO_INI := platformio.ini
|
PLATFORMIO_INI := platformio.ini
|
||||||
BOARDS := $(shell grep -oP '(?<=\[env:)[^\]]+' $(PLATFORMIO_INI) | grep -v '_dbg')
|
BOARDS := $(shell grep -oP '(?<=\[env:)[^\]]+' $(PLATFORMIO_INI) | grep -v '_dbg')
|
||||||
DEBUG_BOARDS := $(shell grep -oP '(?<=\[env:)[^\]]+' $(PLATFORMIO_INI) | grep '_dbg')
|
DEBUG_BOARDS := $(shell grep -oP '(?<=\[env:)[^\]]+' $(PLATFORMIO_INI) | grep '_dbg')
|
||||||
|
UPDATER_BOARDS := $(shell grep -oP '(?<=\[env:)[^\]]+' $(PLATFORMIO_INI) | grep -v '_dbg' | sed 's/^/updater_/')
|
||||||
|
|
||||||
# Default target
|
# Default target
|
||||||
.PHONY: default
|
.PHONY: default
|
||||||
@@ -11,7 +12,7 @@ default: esp32
|
|||||||
release: $(BOARDS)
|
release: $(BOARDS)
|
||||||
|
|
||||||
.PHONY: updater
|
.PHONY: updater
|
||||||
release: updater_$(BOARDS)
|
updater: $(UPDATER_BOARDS)
|
||||||
|
|
||||||
.PHONY: debug
|
.PHONY: debug
|
||||||
debug: $(DEBUG_BOARDS)
|
debug: $(DEBUG_BOARDS)
|
||||||
@@ -40,6 +41,7 @@ help:
|
|||||||
@echo " make deps - Install software dependencies (PlatformIO)"
|
@echo " make deps - Install software dependencies (PlatformIO)"
|
||||||
@echo " make all - Build all boards in both release and debug modes"
|
@echo " make all - Build all boards in both release and debug modes"
|
||||||
@$(foreach board,$(BOARDS),echo " make $(board) - Build $(board) in release mode";)
|
@$(foreach board,$(BOARDS),echo " make $(board) - Build $(board) in release mode";)
|
||||||
|
@$(foreach board,$(UPDATER_BOARDS),echo " make $(board) - Build updater for $(board) in release mode";)
|
||||||
@$(foreach board,$(DEBUG_BOARDS),echo " make $(board) - Build $(board) in debug mode";)
|
@$(foreach board,$(DEBUG_BOARDS),echo " make $(board) - Build $(board) in debug mode";)
|
||||||
@echo "Available boards:"
|
@echo "Available boards:"
|
||||||
@echo " $(BOARDS)"
|
@echo " $(BOARDS)"
|
||||||
|
|||||||
Reference in New Issue
Block a user