Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cpp] - settable clonable commits value - vcpkg #1222

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/cpp/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ ENV VCPKG_ROOT=/usr/local/vcpkg \
ENV PATH="${PATH}:${VCPKG_ROOT}"

ARG USERNAME=vscode
ARG CLONE_COMMITS=1

# Install vcpkg itself: https://github.com/microsoft/vcpkg/blob/master/README.md#quick-start-unix
COPY base-scripts/install-vcpkg.sh /tmp/
RUN chmod +x /tmp/install-vcpkg.sh \
&& ./tmp/install-vcpkg.sh ${USERNAME} \
&& ./tmp/install-vcpkg.sh ${USERNAME} ${CLONE_COMMITS} \
&& rm -f /tmp/install-vcpkg.sh

# [Optional] Uncomment this section to install additional OS packages.
Expand Down
3 changes: 2 additions & 1 deletion src/cpp/.devcontainer/base-scripts/install-vcpkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
set -e

USERNAME=${1:-"vscode"}
CLONE_COMMITS=${2:-1}

. /etc/os-release

Expand Down Expand Up @@ -56,7 +57,7 @@ usermod -a -G "vcpkg" "${USERNAME}"
# Clone repository with ports and installer
mkdir -p "${VCPKG_ROOT}"
mkdir -p "${VCPKG_DOWNLOADS}"
git clone --depth=1 \
git clone --depth=${CLONE_COMMITS} \
-c core.eol=lf \
-c core.autocrlf=false \
-c fsck.zeroPaddedFilemode=ignore \
Expand Down
Loading