2020-07-03 22:56:47 +00:00
|
|
|
TASMOTA_VERSION=v8.3.1
|
2018-10-31 12:41:26 +00:00
|
|
|
export PLATFORMIO_BUILD_FLAGS=-DUSE_CONFIG_OVERRIDE
|
2018-01-18 19:13:35 +00:00
|
|
|
|
2020-07-03 23:30:23 +00:00
|
|
|
default: build_tasmota build_tasmota-minimal
|
2018-01-18 19:13:35 +00:00
|
|
|
|
2018-01-18 19:39:25 +00:00
|
|
|
chown:
|
|
|
|
chown -R $(UID) build
|
|
|
|
|
|
|
|
ci: full-clean default
|
2018-01-18 19:13:35 +00:00
|
|
|
|
2018-10-31 12:41:26 +00:00
|
|
|
build_%: download korvike venv
|
2020-07-04 18:23:15 +00:00
|
|
|
./korvike -i uco_$*.h -o tasmota/tasmota/user_config_override.h
|
2018-01-18 19:13:35 +00:00
|
|
|
cd tasmota && ../venv/bin/platformio run -e $*
|
|
|
|
mkdir -p build
|
2020-07-03 22:56:47 +00:00
|
|
|
cp tasmota/.pioenvs/$*/firmware.bin build/$*.bin
|
2018-01-18 19:13:35 +00:00
|
|
|
|
2018-10-31 12:41:26 +00:00
|
|
|
clean final:
|
|
|
|
rm -rf korvike tasmota venv
|
2018-01-18 19:13:35 +00:00
|
|
|
|
|
|
|
download:
|
|
|
|
git clone https://github.com/arendst/Sonoff-Tasmota.git tasmota
|
|
|
|
cd tasmota && git reset --hard $(TASMOTA_VERSION)
|
|
|
|
|
2018-01-18 19:39:25 +00:00
|
|
|
full-clean: clean
|
|
|
|
rm -rf build
|
2018-10-31 12:41:26 +00:00
|
|
|
|
|
|
|
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:
|
2020-07-03 22:56:47 +00:00
|
|
|
virtualenv venv
|
2018-10-31 12:41:26 +00:00
|
|
|
./venv/bin/pip install -r requirements.txt
|
|
|
|
|
|
|
|
.PHONY: venv
|
|
|
|
|
|
|
|
manual:
|
2020-07-03 23:00:04 +00:00
|
|
|
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'
|