Unverified Commit e46c73de authored by Samruddhi Khandale's avatar Samruddhi Khandale Committed by GitHub

Git - Bug Fix: Feature fails with "ppa:false" for bionic & jammy (#339)

parent a3dc31d3
{ {
"id": "git", "id": "git",
"version": "1.1.0", "version": "1.1.1",
"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,7 +147,15 @@ if [ "$(echo "${GIT_VERSION}" | grep -o '\.' | wc -l)" != "2" ]; then ...@@ -147,7 +147,15 @@ if [ "$(echo "${GIT_VERSION}" | grep -o '\.' | wc -l)" != "2" ]; then
fi fi
fi fi
check_packages libpcre2-posix2 libpcre2-dev check_packages libpcre2-dev
if [ "${VERSION_CODENAME}" = "focal" ]; then
check_packages libpcre2-posix2
elif [ "${VERSION_CODENAME}" = "bionic" ]; then
check_packages libpcre2-posix0
else
check_packages libpcre2-posix3
fi
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
......
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
check "version" git --version
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
reportResults
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
check "version" git --version
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
reportResults
...@@ -7,5 +7,23 @@ ...@@ -7,5 +7,23 @@
"ppa": "false" "ppa": "false"
} }
} }
},
"install_git_from_src_jammy": {
"image": "ubuntu:jammy",
"features": {
"git": {
"version": "latest",
"ppa": "false"
}
}
},
"install_git_from_src_bionic": {
"image": "ubuntu:bionic",
"features": {
"git": {
"version": "latest",
"ppa": "false"
}
}
} }
} }
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