Skip to content

Commit

Permalink
For PR# 1144 checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaniska244 committed Dec 7, 2024
1 parent f8e7e27 commit bca4043
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/git/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "git",
"version": "1.3.2",
"version": "1.3.3",
"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.",
Expand All @@ -19,7 +19,12 @@
"type": "boolean",
"default": true,
"description": "Install from PPA if available (only supported for Ubuntu distributions)"
}
},
"installSubtree": {
"type": "boolean",
"default": true,
"description": "Install git/contrib/subtree"
}
},
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
Expand Down
6 changes: 6 additions & 0 deletions src/git/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

GIT_VERSION=${VERSION} # 'system' checks the base image first, else installs 'latest'
USE_PPA_IF_AVAILABLE=${PPA}
INSTALL_SUBTREE="${INSTALLSUBTREE:-"true"}"

GIT_CORE_PPA_ARCHIVE_GPG_KEY=E1DD270288B4E6030699E45FA1715D88E1DF1F24

Expand Down Expand Up @@ -309,6 +310,11 @@ if [ "${ADJUSTED_ID}" = "alpine" ]; then
git_options+=("NO_GETTEXT=YesPlease")
fi
make -s "${git_options[@]}" all && make -s "${git_options[@]}" install 2>&1
if [[ $INSTALL_SUBTREE = "true" ]]; then
cd contrib/subtree/
make && make install && make install-doc && cp git-subtree ../.. 2>&1
cd ../../
fi
rm -rf /tmp/git-${GIT_VERSION}
clean_up
echo "Done!"

0 comments on commit bca4043

Please sign in to comment.