From e75f7455c4a85e4063aeea46143dcd4342ccfe99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?SZEDER=20G=C3=A1bor?= Date: Sun, 20 Feb 2022 20:07:02 +0100 Subject: [PATCH] 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) --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 86c027d6..d9129ab1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 && \