Skip to content

Commit 77e51e9

Browse files
Adding support to run hcsshim from local clone
Signed-off-by: Mohit Sharma <[email protected]>
1 parent 3f565da commit 77e51e9

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

script/setup/install-runhcs-shim

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
: ${RUNHCS_VERSION:="$(grep 'Microsoft/hcsshim ' go.mod | awk '{print $2}')"}
1818
: ${RUNHCS_REPO:="https://github.com/Microsoft/hcsshim.git"}
19+
: ${HCSSHIM_SRC:=''}
1920
: ${DESTDIR:=''}
2021
: ${GOOS:="windows"}
2122

@@ -28,13 +29,15 @@ cleanup() {
2829
trap 'cleanup' EXIT
2930

3031
export GOOS
31-
32-
(
32+
if [ "$HCSSHIM_SRC" == "" ]
33+
then
3334
set -e -x
3435
cd "$tmpdir"
3536
git init .
3637
git remote add origin "$RUNHCS_REPO"
3738
git fetch --tags --depth=1 origin ${RUNHCS_VERSION}
38-
git checkout "refs/tags/${RUNHCS_VERSION}" || git checkout "refs/heads/${RUNHCS_VERSION}" || git checkout "${RUNHCS_VERSION}"
39-
GO111MODULE=on go build -mod=vendor -o "${DESTDIR}/containerd-shim-runhcs-v1.exe" ./cmd/containerd-shim-runhcs-v1
40-
)
39+
else
40+
cd "${HCSSHIM_SRC}"
41+
fi
42+
git checkout "refs/tags/${RUNHCS_VERSION}" || git checkout "refs/heads/${RUNHCS_VERSION}" || git checkout "${RUNHCS_VERSION}"
43+
GO111MODULE=on go build -mod=vendor -o "${DESTDIR}/containerd-shim-runhcs-v1.exe" ./cmd/containerd-shim-runhcs-v1

0 commit comments

Comments
 (0)