diff options
author | Samruddhi Khandale <skhandale@microsoft.com> | 2022-12-17 03:08:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-17 03:08:37 +0300 |
commit | 2af02c198adabacff30c400b0bfcad972ce5abcc (patch) | |
tree | 4c80f07cdaa71c9ff0bcf5517499a9b0505eea0d | |
parent | e46c73de74942438e079564405c5c4b0291a4aae (diff) |
Git - Bug Fix: Feature fails with "ppa:false" for "buster" & "bullseye" (#340)
-rw-r--r-- | src/git/devcontainer-feature.json | 2 | ||||
-rwxr-xr-x | src/git/install.sh | 4 | ||||
-rw-r--r-- | test/git/install_git_from_src_bullseye.sh | 16 | ||||
-rw-r--r-- | test/git/install_git_from_src_buster.sh | 16 | ||||
-rw-r--r-- | test/git/scenarios.json | 18 |
5 files changed, 53 insertions, 3 deletions
diff --git a/src/git/devcontainer-feature.json b/src/git/devcontainer-feature.json index bc57675..c68d69d 100644 --- a/src/git/devcontainer-feature.json +++ b/src/git/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "git", - "version": "1.1.1", + "version": "1.1.2", "name": "Git (from source)", "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.", diff --git a/src/git/install.sh b/src/git/install.sh index 2463cc9..24e08e8 100755 --- a/src/git/install.sh +++ b/src/git/install.sh @@ -149,9 +149,9 @@ fi check_packages libpcre2-dev -if [ "${VERSION_CODENAME}" = "focal" ]; then +if [ "${VERSION_CODENAME}" = "focal" ] || [ "${VERSION_CODENAME}" = "bullseye" ]; then check_packages libpcre2-posix2 -elif [ "${VERSION_CODENAME}" = "bionic" ]; then +elif [ "${VERSION_CODENAME}" = "bionic" ] || [ "${VERSION_CODENAME}" = "buster" ]; then check_packages libpcre2-posix0 else check_packages libpcre2-posix3 diff --git a/test/git/install_git_from_src_bullseye.sh b/test/git/install_git_from_src_bullseye.sh new file mode 100644 index 0000000..4bdcf30 --- /dev/null +++ b/test/git/install_git_from_src_bullseye.sh @@ -0,0 +1,16 @@ +#!/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 diff --git a/test/git/install_git_from_src_buster.sh b/test/git/install_git_from_src_buster.sh new file mode 100644 index 0000000..4bdcf30 --- /dev/null +++ b/test/git/install_git_from_src_buster.sh @@ -0,0 +1,16 @@ +#!/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 diff --git a/test/git/scenarios.json b/test/git/scenarios.json index 90aa7e3..22af7a8 100644 --- a/test/git/scenarios.json +++ b/test/git/scenarios.json @@ -25,5 +25,23 @@ "ppa": "false" } } + }, + "install_git_from_src_bullseye": { + "image": "debian:bullseye", + "features": { + "git": { + "version": "latest", + "ppa": "false" + } + } + }, + "install_git_from_src_buster": { + "image": "debian:buster", + "features": { + "git": { + "version": "latest", + "ppa": "false" + } + } } } |