docker: using VERSION-vendor to record version

This commit is contained in:
chenjiankun 2022-11-24 11:46:52 +08:00
parent 52367f1665
commit 3cc77fa02d
8 changed files with 17 additions and 11 deletions

View File

@ -1 +0,0 @@
18.09.0.314

1
VERSION-vendor Normal file
View File

@ -0,0 +1 @@
18.09.0.315

View File

@ -39,8 +39,8 @@ if [ "$1" == "selinux" ]; then
cp -rf $src/components/engine/contrib/selinux-euleros/docker-engine-selinux/* .
else
cp -rf $src/* .
cp -rf VERSION-openeuler $cwd/components/cli/
cp -rf VERSION-openeuler $cwd/components/engine/
cp -rf VERSION-vendor $cwd/components/cli/
cp -rf VERSION-vendor $cwd/components/engine/
cp -rf git-commit $cwd/components/cli/
cp -rf git-commit $cwd/components/engine/
fi

View File

@ -1,6 +1,6 @@
Name: docker-engine
Version: 18.09.0
Release: 314
Release: 315
Epoch: 2
Summary: The open-source application container engine
Group: Tools/Docker
@ -11,7 +11,7 @@ Source1: patch.tar.gz
Source2: apply-patches
Source3: git-commit
Source4: series.conf
Source5: VERSION-openeuler
Source5: VERSION-vendor
Source6: gen-commit.sh
URL: https://mobyproject.org
@ -213,6 +213,12 @@ fi
%endif
%changelog
* Thu Nov 24 2022 chenjiankun<chenjiankun1@huawei.com> - 18.09.0-315
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:using VERSION-vendor to record version
* Tue Nov 22 2022 chenjiankun<chenjiankun1@huawei.com> - 18.09.0-314
- Type:bugfix
- CVE:NA

View File

@ -14,7 +14,7 @@ echo "${changeID}" > git-commit
old_version=`head -n 10 docker.spec|grep Release|awk '{print $2}'`
let new_version=$old_version+1
sed -i -e "s/^\Release: $old_version/Release: $new_version/g" ./*.spec
echo 18.09.0.$new_version > VERSION-openeuler
echo 18.09.0.$new_version > VERSION-vendor
author=$(git config user.name)
email=$(git config user.email)

View File

@ -1 +1 @@
eca9bca4da7991a3fc6397f580ffedeb25ccb15d
c8f038afd97f57b150946e88df14762a5d4dfc98

View File

@ -21,7 +21,7 @@ index d504032..86d0e3a 100755
PLATFORM=${PLATFORM:-}
VERSION=${VERSION:-"unknown-version"}
-EULERVERSION=${EULERVERSION:-$(cat VERSION-EULER)}
+EULERVERSION=${EULERVERSION:-$(cat VERSION-openeuler)}
+EULERVERSION=${EULERVERSION:-$(cat VERSION-vendor)}
GITCOMMIT=${GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true)}
BUILDTIME=${BUILDTIME:-$(date --utc --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')}
@ -34,7 +34,7 @@ index fa87d91..686e688 100755
)
-VERSION_EULER=$(< ./VERSION-EULER)
+VERSION_EULER=$(< ./VERSION-openeuler)
+VERSION_EULER=$(< ./VERSION-vendor)
VERSION=${VERSION:-dev}
! BUILDTIME=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')
if [ "$DOCKER_GITCOMMIT" ]; then

View File

@ -16,7 +16,7 @@ index 86d0e3a..a23e379 100755
@@ -4,7 +4,7 @@ set -eu
PLATFORM=${PLATFORM:-}
VERSION=${VERSION:-"unknown-version"}
EULERVERSION=${EULERVERSION:-$(cat VERSION-openeuler)}
EULERVERSION=${EULERVERSION:-$(cat VERSION-vendor)}
-GITCOMMIT=${GITCOMMIT:-$(git rev-parse --short HEAD 2> /dev/null || true)}
+GITCOMMIT=${GITCOMMIT:-$(cat git-commit | head -c 7)}
BUILDTIME=${BUILDTIME:-$(date --utc --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')}
@ -27,7 +27,7 @@ index 686e688..f4a51e7 100755
--- a/components/engine/hack/make.sh
+++ b/components/engine/hack/make.sh
@@ -68,6 +68,7 @@ DEFAULT_BUNDLES=(
VERSION_EULER=$(< ./VERSION-openeuler)
VERSION_EULER=$(< ./VERSION-vendor)
VERSION=${VERSION:-dev}
! BUILDTIME=$(date -u -d "@${SOURCE_DATE_EPOCH:-$(date +%s)}" --rfc-3339 ns 2> /dev/null | sed -e 's/ /T/')
+DOCKER_GITCOMMIT=$(cat git-commit | head -c 7)