Unverified Commit 7fa90110 authored by Samruddhi Khandale's avatar Samruddhi Khandale Committed by GitHub

Git: Build from source with USE_LIBPCRE (#331)

parent baf47e22
{ {
"id": "git", "id": "git",
"version": "1.0.5", "version": "1.1.0",
"name": "Git (from source)", "name": "Git (from source)",
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/git",
"description": "Install an up-to-date version of Git, built from source as needed. Useful for when you want the latest and greatest features. Auto-detects latest stable version and installs needed dependencies.", "description": "Install an up-to-date version of Git, built from source as needed. Useful for when you want the latest and greatest features. Auto-detects latest stable version and installs needed dependencies.",
......
...@@ -147,11 +147,13 @@ if [ "$(echo "${GIT_VERSION}" | grep -o '\.' | wc -l)" != "2" ]; then ...@@ -147,11 +147,13 @@ if [ "$(echo "${GIT_VERSION}" | grep -o '\.' | wc -l)" != "2" ]; then
fi fi
fi fi
check_packages libpcre2-posix2 libpcre2-dev
echo "Downloading source for ${GIT_VERSION}..." echo "Downloading source for ${GIT_VERSION}..."
curl -sL https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz | tar -xzC /tmp 2>&1 curl -sL https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz | tar -xzC /tmp 2>&1
echo "Building..." echo "Building..."
cd /tmp/git-${GIT_VERSION} cd /tmp/git-${GIT_VERSION}
make -s prefix=/usr/local all && make -s prefix=/usr/local install 2>&1 make -s USE_LIBPCRE=YesPlease prefix=/usr/local all && make -s USE_LIBPCRE=YesPlease prefix=/usr/local install 2>&1
rm -rf /tmp/git-${GIT_VERSION} rm -rf /tmp/git-${GIT_VERSION}
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
echo "Done!" echo "Done!"
...@@ -8,5 +8,9 @@ source dev-container-features-test-lib ...@@ -8,5 +8,9 @@ source dev-container-features-test-lib
check "version" git --version check "version" git --version
check "gettext" dpkg-query -l gettext check "gettext" dpkg-query -l gettext
cd /tmp && git clone https://github.com/devcontainers/feature-starter.git
cd feature-starter
check "perl" bash -c "git -c grep.patternType=perl grep -q 'a.+b'"
# Report result # Report result
reportResults reportResults
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment