Skip to content

Commit

Permalink
CMake Add sha1sum.
Browse files Browse the repository at this point in the history
CMake		Rename binaries for different targets and build types.
  • Loading branch information
NotCompsky committed Sep 15, 2020
1 parent 41522bb commit fb83c8c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ FROM notcompsky/static-wangle-ffmpeg-opencv:latest AS intermediate
WORKDIR /bpcs
COPY CMakeLists.txt /bpcs/CMakeLists.txt
COPY src /bpcs/src
ARG target=linux-x64
RUN mkdir -p /usr/local/include/compsky/macros \
&& curl -sL https://raw.githubusercontent.com/NotCompsky/libcompsky/master/include/compsky/macros/likely.hpp > /usr/local/include/compsky/macros/likely.hpp \
\
&& mkdir /bpcs/build \
&& mkdir /bpcs-bin \
&& for buildtype in Release Debug RelWithDebInfo MinSizeRel; do \
( mkdir "/bpcs/build/$buildtype" \
&& cd "/bpcs/build/$buildtype" \
Expand All @@ -24,9 +26,13 @@ RUN mkdir -p /usr/local/include/compsky/macros \
&& ls -l bpcs* \
&& strip -s bpcs* \
&& ls -l bpcs* \
&& sha1sum bpcs* \
&& for f in bpcs bpcs-x bpcs-count bpcs-fmt; do \
mv "$f" "/bpcs-bin/${target}_${buildtype}_${f}"; \
done \
); done

FROM alpine:latest
WORKDIR /bpcs
COPY --from=intermediate /bpcs/build /bpcs/
COPY --from=intermediate /bpcs-bin/* /bpcs/
ENTRYPOINT [ "/bin/sh" ]

0 comments on commit fb83c8c

Please sign in to comment.