diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 38ce4652..fa89204a 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -70,10 +70,17 @@ RUN . "$TBD_IDF_ACTIVATE" && pip install \ breathe +#### web app build stage #### + +FROM sphinx_docs_stage AS web_app_build_stage + +COPY ./tbd-init.sh "$TBD_PATH/" +RUN "$TBD_INIT" install-bun + #### TBD tools #### # required to build TBD software -FROM sphinx_docs_stage AS tbd_tools_stage +FROM web_app_build_stage AS tbd_tools_stage RUN . "$TBD_IDF_ACTIVATE" && pip install \ typer \ @@ -86,7 +93,6 @@ RUN . "$TBD_IDF_ACTIVATE" && pip install \ pyyaml # setup container shell environment -COPY ./tbd-init.sh "$TBD_PATH/" ENV PATH="$PATH:$TBD_PATH" RUN "$TBD_INIT" integrate-idf diff --git a/.devcontainer/tbd-init.sh b/.devcontainer/tbd-init.sh index e8085419..a3634095 100755 --- a/.devcontainer/tbd-init.sh +++ b/.devcontainer/tbd-init.sh @@ -195,16 +195,22 @@ install_clang() { fi if ! curl -o "$clang_installer" "https://apt.llvm.org/llvm.sh"; then - raise "failed to download clang installer" + raise "failed to download clang installer" fi if ! chmod +x "$clang_installer"; then - raise "failed to set permissions on clang installer" + raise "failed to set permissions on clang installer" fi # install if ! "$clang_installer" 18 all; then - raise "clang installation failed" + raise "clang installation failed" + fi +} + +install_bun() { + if ! curl -fsSL https://bun.sh/install | bash -s "bun-v1.1.4"; then + raise "bun installation failed" fi } @@ -257,6 +263,9 @@ case $command in install-clang) install_clang $command_args ;; + install-bun) + install_bun $command_args + ;; *) raise "unknown command $command" ;;