mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-05-17 13:06:33 +02:00
Merge pull request #602 from strukturag/docker-version
Include "~docker" in version if built on Docker.
This commit is contained in:
commit
55d143d6bc
|
@ -5,7 +5,8 @@ ARG TARGETOS
|
||||||
WORKDIR /workdir
|
WORKDIR /workdir
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN apk add --no-cache bash git build-base protobuf && \
|
RUN touch /.dockerenv && \
|
||||||
|
apk add --no-cache bash git build-base protobuf && \
|
||||||
if [ -d "vendor" ]; then GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOPROXY=off make proxy; else \
|
if [ -d "vendor" ]; then GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOPROXY=off make proxy; else \
|
||||||
GOOS=${TARGETOS} GOARCH=${TARGETARCH} make proxy; fi
|
GOOS=${TARGETOS} GOARCH=${TARGETARCH} make proxy; fi
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,8 @@ ARG TARGETOS
|
||||||
WORKDIR /workdir
|
WORKDIR /workdir
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN apk add --no-cache bash git build-base protobuf && \
|
RUN touch /.dockerenv && \
|
||||||
|
apk add --no-cache bash git build-base protobuf && \
|
||||||
if [ -d "vendor" ]; then GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOPROXY=off make server; else \
|
if [ -d "vendor" ]; then GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOPROXY=off make server; else \
|
||||||
GOOS=${TARGETOS} GOARCH=${TARGETARCH} make server; fi
|
GOOS=${TARGETOS} GOARCH=${TARGETARCH} make server; fi
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,11 @@ if [ -z "$VERSION" ] && [ -d "$ROOT/../.git" ]; then
|
||||||
else
|
else
|
||||||
VERSION=$(git log -1 --pretty=%H)
|
VERSION=$(git log -1 --pretty=%H)
|
||||||
fi
|
fi
|
||||||
|
if [ -f "/.dockerenv" ]; then
|
||||||
|
VERSION="$VERSION~docker"
|
||||||
|
elif grep -sq 'docker\|lxc' /proc/1/cgroup; then
|
||||||
|
VERSION="$VERSION~docker"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$VERSION" ]; then
|
if [ -z "$VERSION" ]; then
|
||||||
|
|
Loading…
Reference in a new issue