Skip to content

Commit

Permalink
pkg: use GITCOMMIT
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Jul 20, 2022
1 parent d5fb29d commit 74cc4a5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ BUILDTIME=$(shell date -u -d "@$${SOURCE_DATE_EPOCH:-$$(date +%s)}" --rfc-3339 n
CHOWN:=docker run --rm -v $(CURDIR):/v -w /v alpine chown
DEFAULT_PRODUCT_LICENSE:=Community Engine
PACKAGER_NAME?=
DOCKER_GITCOMMIT:=abcdefg
GITCOMMIT:=abcdefg
GO_VERSION:=1.18.3
PLATFORM=Docker Engine - Community
SHELL:=/bin/bash
Expand Down
2 changes: 1 addition & 1 deletion deb/common/rules
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ override_dh_builddeb:

override_dh_auto_build:
# Build the daemon and dependencies
cd /go/src/github.com/docker/docker && DOCKER_GITCOMMIT=$(ENGINE_GITCOMMIT) PRODUCT=docker ./hack/make.sh dynbinary
cd /go/src/github.com/docker/docker && GITCOMMIT=$(ENGINE_GITCOMMIT) PRODUCT=docker ./hack/make.sh dynbinary
cd /go/src/github.com/docker/docker && TMP_GOPATH="/go" hack/dockerfile/install/install.sh tini
cd /go/src/github.com/docker/docker && TMP_GOPATH="/go" hack/dockerfile/install/install.sh rootlesskit dynamic
# Build the CLI
Expand Down
2 changes: 1 addition & 1 deletion rpm/SPECS/docker-ce-rootless-extras.spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Either VPNKit or slirp4netns (>= 0.4.0) needs to be installed separately.

%build

export DOCKER_GITCOMMIT=%{_gitcommit_engine}
export GITCOMMIT=%{_gitcommit_engine}
mkdir -p /go/src/github.com/docker
ln -snf ${RPM_BUILD_DIR}/src/engine /go/src/github.com/docker/docker
TMP_GOPATH="/go" ${RPM_BUILD_DIR}/src/engine/hack/dockerfile/install/install.sh rootlesskit dynamic
Expand Down
2 changes: 1 addition & 1 deletion rpm/SPECS/docker-ce.spec
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ depending on a particular stack or provider.

%build

export DOCKER_GITCOMMIT=%{_gitcommit_engine}
export GITCOMMIT=%{_gitcommit_engine}
mkdir -p /go/src/github.com/docker
ln -snf ${RPM_BUILD_DIR}/src/engine /go/src/github.com/docker/docker

Expand Down
6 changes: 3 additions & 3 deletions rpm/gen-rpm-ver
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ rpmRelease=1
tilde='~'
rpmVersion="${rpmVersion//-/$tilde}"

DOCKER_GITCOMMIT=$($GIT_COMMAND rev-parse --short HEAD)
GITCOMMIT=$($GIT_COMMAND rev-parse --short HEAD)
if [ -n "$($GIT_COMMAND status --porcelain --untracked-files=no)" ]; then
DOCKER_GITCOMMIT="$DOCKER_GITCOMMIT-unsupported"
GITCOMMIT="$GITCOMMIT-unsupported"
fi

# if we have a "-dev" suffix or have change in Git, this is a nightly build, and
Expand Down Expand Up @@ -112,4 +112,4 @@ fi

# Replace any remaining dashes with periods
rpmVersion="${rpmVersion//-/.}"
echo "$rpmVersion $rpmRelease $DOCKER_GITCOMMIT $origVersion"
echo "$rpmVersion $rpmRelease $GITCOMMIT $origVersion"

0 comments on commit 74cc4a5

Please sign in to comment.