1
0
Fork 0
mirror of https://github.com/Luzifer/tasmota-build.git synced 2024-12-22 13:51:19 +00:00
tasmota-build/Makefile
Knut Ahlers 4ae8d2e248
Use internal venv
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2020-07-04 20:26:30 +02:00

38 lines
1 KiB
Makefile

TASMOTA_VERSION=v8.3.1
export PLATFORMIO_BUILD_FLAGS=-DUSE_CONFIG_OVERRIDE
default: build_tasmota build_tasmota-minimal
chown:
chown -R $(UID) build
ci: full-clean default
build_%: download korvike venv
./korvike -i uco_$*.h -o tasmota/tasmota/user_config_override.h
cd tasmota && ../venv/bin/platformio run -e $*
mkdir -p build
cp tasmota/.pioenvs/$*/firmware.bin build/$*.bin
clean final:
rm -rf korvike tasmota venv
download:
git clone https://github.com/arendst/Sonoff-Tasmota.git tasmota
cd tasmota && git reset --hard $(TASMOTA_VERSION)
full-clean: clean
rm -rf build
korvike:
curl -sSfL https://github.com/Luzifer/korvike/releases/download/v0.5.0/korvike_linux_amd64.tar.gz | tar -xz
mv korvike_linux_amd64 korvike
venv:
python -m venv venv
./venv/bin/pip install -r requirements.txt
.PHONY: venv
manual:
vault2env --key=secret/jenkins/build-tasmota -- bash -eux -o pipefail -c 'env | grep -v PATH > ./env && docker run --rm -i --env-file=env -e UID=$(shell id -u) -v "$(CURDIR):/src" -w /src python make ci chown final'