aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorIvan Zorin <[email protected]>2023-07-20 04:52:22 +0300
committerGitHub <[email protected]>2023-07-20 11:52:22 +1000
commit297a4dffa59c10f9245f4e1b783b0ef066184d51 (patch)
tree99aa57344b2274246f1e956ca2ff5f4fa83f3c0f /scripts
parent93a18e50768dac77e3ff29eec63f34fda1145bc7 (diff)
downloadIronOS-297a4dffa59c10f9245f4e1b783b0ef066184d51.tar.gz
IronOS-297a4dffa59c10f9245f4e1b783b0ef066184d51.zip
Replace /build/source by /build/ironos to eliminate ambiguity with /build/source/source (#1748)
* docker/buildAll.sh: replace /build/source by /build/ironos to eliminate ambiguity with /build/source/source * scripts/ci/buildAll.sh: fix shellcheck and add additional comment
Diffstat (limited to 'scripts')
-rw-r--r--scripts/IronOS.Dockerfile6
-rwxr-xr-xscripts/ci/buildAll.sh18
2 files changed, 16 insertions, 8 deletions
diff --git a/scripts/IronOS.Dockerfile b/scripts/IronOS.Dockerfile
index 6d196676..c15fb2b6 100644
--- a/scripts/IronOS.Dockerfile
+++ b/scripts/IronOS.Dockerfile
@@ -4,7 +4,7 @@ FROM alpine:3.16
LABEL maintainer="Ben V. Brown <[email protected]>"
# Default current dir when container starts
-WORKDIR /build/source
+WORKDIR /build/ironos
# Installing the two compilers (ARM & RISCV), python3 & pip, clang tools:
## - compilers: gcc-*, newlib-*
@@ -29,7 +29,7 @@ RUN apk add --no-cache ${APK_COMPS} ${APK_PYTHON} ${APK_MISC} ${APK_DEV}
RUN python3 -m pip install ${PIP_PKGS}
# Git trust to avoid related warning
-RUN git config --global --add safe.directory /build/source
+RUN git config --global --add safe.directory /build/ironos
-COPY . /build/source
+COPY . /build/ironos
COPY ./scripts/ci /build/ci
diff --git a/scripts/ci/buildAll.sh b/scripts/ci/buildAll.sh
index 566cfe72..f5fcf067 100755
--- a/scripts/ci/buildAll.sh
+++ b/scripts/ci/buildAll.sh
@@ -2,12 +2,20 @@
set -e
set -u
-mkdir -p /build/ci/artefacts
+# Init vars
+dir_ci="/build/ci"
+dir_ironos="/build/ironos"
+dir_source="${dir_ironos}/source"
-# Build STM code
-cd /build/source/source/
+# Prepare output dir
+dir_artefacts="${dir_ci}/artefacts"
+mkdir -p "${dir_artefacts}"
+
+# Build firmware
+cd "${dir_source}"
bash ./build.sh || exit 1
echo "All Firmware built"
+
# Copy out all the final resulting files we would like to store for the next op
-cp -r /build/source/source/Hexfile/*.hex /build/ci/artefacts/
-cp -r /build/source/source/Hexfile/*.bin /build/ci/artefacts/
+cp -r "${dir_source}"/Hexfile/*.bin "${dir_artefacts}"
+cp -r "${dir_source}"/Hexfile/*.hex "${dir_artefacts}"