Skip to content

Commit dc9bb7f

Browse files
authored
Merge pull request #287 from crazy-max/fix-model-cli
pkg(model): repo moved to github.com/docker/model-runner/cmd/cli
2 parents d7c86b4 + 5897de3 commit dc9bb7f

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

docker-bake.hcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,9 @@ target "_pkg-docker-engine" {
566566
target "_pkg-model" {
567567
args = {
568568
PKG_NAME = PKG_NAME != null && PKG_NAME != "" ? PKG_NAME : "docker-model-plugin"
569-
PKG_REPO = PKG_REPO != null && PKG_REPO != "" ? PKG_REPO : "https://github.com/docker/model-cli.git"
569+
PKG_REPO = PKG_REPO != null && PKG_REPO != "" ? PKG_REPO : "https://github.com/docker/model-runner.git"
570570
PKG_REF = PKG_REF != null && PKG_REF != "" ? PKG_REF : "main"
571-
GO_VERSION = GO_VERSION != null && GO_VERSION != "" ? GO_VERSION : "1.24.7" # https://github.com/docker/model-cli/blob/301126afc8ef4b8330de56db5d2889ddbc978022/Dockerfile#L3
571+
GO_VERSION = GO_VERSION != null && GO_VERSION != "" ? GO_VERSION : "1.24.7" # https://github.com/docker/model-runner/blob/039f7a31c0365f9161c9b9b6bb3888161d16e388/cmd/cli/Dockerfile#L3
572572
GO_IMAGE_VARIANT = GO_IMAGE_VARIANT != null && GO_IMAGE_VARIANT != "" ? GO_IMAGE_VARIANT : "bookworm"
573573
PKG_DEB_EPOCH = PKG_DEB_EPOCH != null && PKG_DEB_EPOCH != "" ? PKG_DEB_EPOCH : ""
574574
}
@@ -591,7 +591,7 @@ function "pkgPlatforms" {
591591
docker-cli = ["darwin/amd64", "darwin/arm64", "linux/386", "linux/amd64", "linux/arm/v6", "linux/arm/v7", "linux/arm64", "linux/ppc64le", "linux/riscv64", "linux/s390x", "windows/amd64", "windows/arm64"]
592592
# https://github.com/moby/moby/blob/83264918d3e1c61341511e360a7277150b914b3f/docker-bake.hcl#L82-L91
593593
docker-engine = ["linux/amd64", "linux/arm/v6", "linux/arm/v7", "linux/arm64", "linux/ppc64le", "linux/s390x", "windows/amd64", "windows/arm64"]
594-
# https://github.com/docker/model-cli/blob/301126afc8ef4b8330de56db5d2889ddbc978022/Makefile#L36-L40
594+
# https://github.com/docker/model-runner/blob/039f7a31c0365f9161c9b9b6bb3888161d16e388/cmd/cli/Makefile#L39-L43
595595
model = ["darwin/amd64", "darwin/arm64", "linux/amd64", "linux/arm64", "linux/arm/v7", "windows/amd64", "windows/arm64"]
596596
}, pkg, [])
597597
}

pkg/model/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ARG DISTRO_ID="12"
2525
ARG DISTRO_IMAGE="debian:bookworm"
2626

2727
ARG PKG_NAME="docker-model-plugin"
28-
ARG PKG_REPO="https://github.com/docker/model-cli.git"
28+
ARG PKG_REPO="https://github.com/docker/model-runner.git"
2929
ARG PKG_REF="main"
3030

3131
ARG GO_IMAGE="golang"

pkg/model/deb/control

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Section: admin
33
Priority: optional
44
Maintainer: Docker <support@docker.com>
55
Homepage: https://www.docker.com
6-
Vcs-Browser: https://github.com/docker/model-cli
7-
Vcs-Git: git://github.com/docker/model-cli.git
6+
Vcs-Browser: https://github.com/docker/model-runner
7+
Vcs-Git: git://github.com/docker/model-runner.git
88
Standards-Version: 3.9.6
99
Build-Depends: bash,
1010
debhelper-compat (= 12),

pkg/model/deb/rules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ override_dh_builddeb:
1414

1515
override_dh_auto_build:
1616
mkdir -p /usr/libexec/docker/cli-plugins && \
17-
GO111MODULE=on make -C $(CURDIR)/model VERSION=$(VERSION) ce-release \
18-
&& mv $(CURDIR)/model/dist/docker-model /usr/libexec/docker/cli-plugins/docker-model
17+
GO111MODULE=on make -C $(CURDIR)/model/cmd/cli VERSION=$(VERSION) ce-release \
18+
&& mv $(CURDIR)/model/cmd/cli/dist/docker-model /usr/libexec/docker/cli-plugins/docker-model
1919

2020
override_dh_auto_test:
2121
ver="$$(/usr/libexec/docker/cli-plugins/docker-model docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $$1 == "Version" { print $$2 }')"; \

pkg/model/rpm/docker-model-plugin.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ This plugin provides the 'docker model' subcommand.
2626
%setup -q -c -n src -a 0
2727

2828
%build
29-
GO111MODULE=on make -C ${RPM_BUILD_DIR}/src/model VERSION=%{_origversion} ce-release
29+
GO111MODULE=on make -C ${RPM_BUILD_DIR}/src/model/cmd/cli VERSION=%{_origversion} ce-release
3030

3131
%check
3232
ver="$(${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-model docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }')"; \
3333
test "$ver" = "%{_origversion}" && echo "PASS: docker-model version OK" || (echo "FAIL: docker-model version ($ver) did not match" && exit 1)
3434

3535
%install
36-
install -D -p -m 0755 ${RPM_BUILD_DIR}/src/model/dist/docker-model ${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-model
36+
install -D -p -m 0755 ${RPM_BUILD_DIR}/src/model/cmd/cli/dist/docker-model ${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-model
3737

3838
for f in LICENSE; do
3939
install -D -p -m 0644 "${RPM_BUILD_DIR}/src/model/$f" "docker-model-plugin-docs/$f"

pkg/model/scripts/pkg-static-build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ binext=$([ "$(xx-info os)" = "windows" ] && echo ".exe" || true)
4747

4848
(
4949
set -x
50-
pushd ${SRCDIR}
51-
# https://github.com/docker/model-cli/blob/main/Makefile#L52C2-L52C145
52-
go build -trimpath -ldflags="-w -X github.com/docker/model-cli/desktop.Version=${GENVER_VERSION}" -o "${BUILDDIR}/${PKG_NAME}/docker-model" .
50+
pushd ${SRCDIR}/cmd/cli
51+
# https://github.com/docker/model-runner/blob/039f7a31c0365f9161c9b9b6bb3888161d16e388/cmd/cli/Makefile#L39-L43
52+
go build -trimpath -ldflags="-w -X github.com/docker/model-runner/cmd/cli/desktop.Version=${GENVER_VERSION}" -o "${BUILDDIR}/${PKG_NAME}/docker-model" .
5353
popd
5454
if [ "$(xx-info os)" = "windows" ]; then
5555
mv "${BUILDDIR}/${PKG_NAME}/docker-model" "${BUILDDIR}/${PKG_NAME}/docker-model.exe"

0 commit comments

Comments
 (0)