diff options
| author | Thomas Huber <113915837+huber-th@users.noreply.github.com> | 2024-02-20 01:24:58 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-20 09:24:58 +0000 |
| commit | dd3da03b9d8de287570d23245ff3a0c321bb0e31 (patch) | |
| tree | e7c73d67fc7292cb6377f1c3878c2b4e213138e9 /Makefile | |
| parent | b4165d65c86709050e37cc98916f687659422605 (diff) | |
Fix version.dtsi is reset after local firmware build (#385)
In #376 a new step was introduced for local builds to undo changes
to the version.dtsi file after a build in order to reduce noise to the repo.
Unfortunately the way used to execute the step causes the version.dtsi
file to be reset too early and therefore causes an incorrect version
number to be used for the version macro when run locally. This went
unfortunately undiscovered as the checked in version.dtsi was the same
on the day the change in #376 was tested and was not noticed until
I build a new change to my keymap locally a few days ago.
The git command introduced in #376 is wrapped into a shell function.
However what was missed is that commands run by the shell function are run when
the function calls are expanded by make. This causes the version.dtsi file to be reset
before the firmware build process is even started which resultes in the version.dtsi
currently checked in to the repo to be used for local builds instead of the
newly generated file when make starts.
This change updates how the git command to reset the version.dtsi
is being called. It is no longer called within a shell function to ensure it
does run in the order it is defined after the firmware build is complete.
Builds run through GitHub actions are not impacted and always used the correct version.dtsi
For more information and context see:
- https://www.gnu.org/software/make/manual/html_node/Shell-Function.html
- https://www.gnu.org/software/make/manual/html_node/Reading-Makefiles.html
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -22,7 +22,7 @@ all: -e COMMIT=$(COMMIT) \ -e BUILD_RIGHT=true \ zmk - $(shell git checkout config/version.dtsi) + git checkout config/version.dtsi left: $(shell bin/get_version.sh >> /dev/null) @@ -34,7 +34,7 @@ left: -e COMMIT=$(COMMIT) \ -e BUILD_RIGHT=false \ zmk - $(shell git checkout config/version.dtsi) + git checkout config/version.dtsi clean_firmware: rm -f firmware/*.uf2 |
