Skip to content

Commit e90f4f9

Browse files
git : Remove misleading variables (devcontainers#146)
* remove misleading ppa value * add test * nit * bump version
1 parent 32578d6 commit e90f4f9

4 files changed

Lines changed: 26 additions & 3 deletions

File tree

src/git/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "git",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/git-from-src.md
88
# Maintainer: The VS Code and Codespaces Teams
99

10-
GIT_VERSION=${VERSION:-"latest"} # 'system' checks the base image first, else installs 'latest'
11-
USE_PPA_IF_AVAILABLE=${PPA:-"false"}
10+
GIT_VERSION=${VERSION} # 'system' checks the base image first, else installs 'latest'
11+
USE_PPA_IF_AVAILABLE=${PPA}
1212

1313
GIT_CORE_PPA_ARCHIVE_GPG_KEY=E1DD270288B4E6030699E45FA1715D88E1DF1F24
1414
GPG_KEY_SERVERS="keyserver hkp://keyserver.ubuntu.com:80

test/git/install_git_from_src.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# Optional: Import test library
6+
source dev-container-features-test-lib
7+
8+
check "version" git --version
9+
check "gettext" dpkg-query -l gettext
10+
11+
# Report result
12+
reportResults

test/git/scenarios.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"install_git_from_src": {
3+
"image": "ubuntu:focal",
4+
"features": {
5+
"git": {
6+
"version": "latest",
7+
"ppa": "false"
8+
}
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)