marcelstoer / docker-nodemcu-build

Docker image to build NodeMCU firmware for the ESP8266 on your machine
https://hub.docker.com/r/marcelstoer/nodemcu-build/
MIT License
131 stars 63 forks source link

USER_PROLOG #87

Closed rvalle closed 4 years ago

rvalle commented 4 years ago

Hi!

I have integrated this builder image in our gitlab-ci process

I need to add information about our build, which I believe is done overriding USER_PROLOG

I am trying to set it up in passed environment parameter but does its not working, neither is setting it into app/include/user_version.h

Is it possible? How?

rvalle commented 4 years ago

in fact the BRANCH is also shown as HEAD, because of the checkout that gitlab-ci does.

marcelstoer commented 4 years ago

The branch is detected automatically for both ESP8266 and ESP32 with $(git rev-parse --abbrev-ref HEAD | sed -r 's/[\/\\]+/_/g').

The env variable USER_PROLOG is exported by the build script before make is invoked at https://github.com/marcelstoer/docker-nodemcu-build/blob/master/build-esp8266#L11. If you want to control its value I currently see two options: