Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ARG DPDK_VER=25.11
ARG DPDK_BUILDTYPE=release
ARG DPSERVICE_BUILDTYPE=debug
ARG DPSERVICE_FEATURES=""
ARG DPSERVICE_VERSION=""

WORKDIR /workspace

Expand Down Expand Up @@ -99,7 +100,7 @@ COPY include/ include/
COPY .git/ .git/

# Compile dpservice itself
RUN meson setup build -Dbuild_dpservice_cli=true -Dbuildtype=$DPSERVICE_BUILDTYPE $DPSERVICE_FEATURES && ninja -C build
RUN DPSERVICE_VERSION="${DPSERVICE_VERSION}" meson setup build -Dbuild_dpservice_cli=true -Dbuildtype=$DPSERVICE_BUILDTYPE $DPSERVICE_FEATURES && ninja -C build


# Extended build image for test-image
Expand Down
6 changes: 6 additions & 0 deletions hack/get_version.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash

# Allow overriding the version via environment variable
if [ -n "$DPSERVICE_VERSION" ]; then
echo "$DPSERVICE_VERSION"
exit 0
fi

# For non-tagged commits, this is a simple "vX.X.X-XX-gXXXXXXX"
# For dpservice-bin tagged commits, this is "vX.X.X"
# For dpservice-go tagged commits, this is "go/dpservice-go/vX.X.X-XX-gXXXXXXX"
Expand Down
Loading