Dockerfile: generate autogen/version.c only once

Since c5720564 (Force version to be regenerated on each compile,
2021-06-01) `autogen/version.c` must be generated during the build
process, but the build instructions in the `Dockerfile` have not been
updated accordingly.  Since then two commits [1] on separate branches
updated `Dockerfile` to deal with the missing file, and now
`autogen/version.c` is generated twice during a containerized build.

Remove all redundant commands from `Dockerfile`'s `CMD` instruction to
generate `autogen/version.c` and its subdirectory only once.

[1] 8e9745a6 (Add version.c generation to dockerbuild and actions,
              2021-11-02)
    7f013d6d (Fixed dockerbuild.sh, now run as user (instead
              of root) and fixed the autogeneration of version.c,
              2021-09-16)
This commit is contained in:
SZEDER Gábor
2022-02-20 20:07:02 +01:00
parent 22226faef4
commit e75f7455c4

View File

@@ -23,7 +23,6 @@ CMD \
python ../tools/odrive/version.py \
--output autogen/version.c && \
# Regenerate python interface
mkdir ../Firmware/autogen; \
python interface_generator_stub.py \
--definitions odrive-interface.yaml \
--template ../tools/enums_template.j2 \
@@ -32,7 +31,6 @@ CMD \
--definitions odrive-interface.yaml \
--template ../tools/arduino_enums_template.j2 \
--output ../Arduino/ODriveArduino/ODriveEnums.h && \
python ../tools/odrive/version.py --output ../Firmware/autogen/version.c && \
# Hack around Tup's dependency on FUSE
tup init && \
tup generate build.sh && \