Skip to content

Commit 7fa9011

Browse files
Git: Build from source with USE_LIBPCRE (#331)
1 parent baf47e2 commit 7fa9011

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/git/devcontainer-feature.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "git",
3-
"version": "1.0.5",
3+
"version": "1.1.0",
44
"name": "Git (from source)",
55
"documentationURL": "https://github.com/devcontainers/features/tree/main/src/git",
66
"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.",

src/git/install.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,13 @@ if [ "$(echo "${GIT_VERSION}" | grep -o '\.' | wc -l)" != "2" ]; then
147147
fi
148148
fi
149149

150+
check_packages libpcre2-posix2 libpcre2-dev
151+
150152
echo "Downloading source for ${GIT_VERSION}..."
151153
curl -sL https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz | tar -xzC /tmp 2>&1
152154
echo "Building..."
153155
cd /tmp/git-${GIT_VERSION}
154-
make -s prefix=/usr/local all && make -s prefix=/usr/local install 2>&1
156+
make -s USE_LIBPCRE=YesPlease prefix=/usr/local all && make -s USE_LIBPCRE=YesPlease prefix=/usr/local install 2>&1
155157
rm -rf /tmp/git-${GIT_VERSION}
156158
rm -rf /var/lib/apt/lists/*
157159
echo "Done!"

test/git/install_git_from_src.sh

+4
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@ source dev-container-features-test-lib
88
check "version" git --version
99
check "gettext" dpkg-query -l gettext
1010

11+
cd /tmp && git clone https://github.com/devcontainers/feature-starter.git
12+
cd feature-starter
13+
check "perl" bash -c "git -c grep.patternType=perl grep -q 'a.+b'"
14+
1115
# Report result
1216
reportResults

0 commit comments

Comments
 (0)