Skip to content

Commit a0d152c

Browse files
authored
Merge pull request #101 from scaryrawr/git-2.53-fix
Add support for microsoft/git amd64/arm64.deb
2 parents ad2f869 + 8498092 commit a0d152c

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/microsoft-git/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Microsoft Git for monorepo with GVFS support",
33
"id": "microsoft-git",
4-
"version": "1.0.7",
4+
"version": "1.0.8",
55
"description": "A fork of Git containing Microsoft-specific patches",
66
"options": {
77
"version": {

src/microsoft-git/install.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,21 @@ fi
8585
# Install for Debian/Ubuntu
8686
check_packages wget git
8787

88-
wget -q https://github.com/microsoft/git/releases/download/v${GIT_VERSION}/microsoft-git_${GIT_VERSION}.deb
88+
# Detect host architecture for arch-specific .deb packages (added in v2.52.0.vfs.0.5+)
89+
ARCH="$(dpkg --print-architecture)"
90+
DEB_URL="https://github.com/microsoft/git/releases/download/v${GIT_VERSION}/microsoft-git_${GIT_VERSION}_${ARCH}.deb"
91+
DEB_FILE="microsoft-git_${GIT_VERSION}_${ARCH}.deb"
92+
93+
# Try arch-specific .deb first, fall back to no-arch .deb for older releases
94+
if ! wget -q "${DEB_URL}" -O "${DEB_FILE}" 2>/dev/null; then
95+
DEB_URL="https://github.com/microsoft/git/releases/download/v${GIT_VERSION}/microsoft-git_${GIT_VERSION}.deb"
96+
DEB_FILE="microsoft-git_${GIT_VERSION}.deb"
97+
wget -q "${DEB_URL}" -O "${DEB_FILE}"
98+
fi
8999

90-
dpkg -i "microsoft-git_${GIT_VERSION}.deb"
100+
dpkg -i "${DEB_FILE}"
91101

92-
rm "microsoft-git_${GIT_VERSION}.deb"
102+
rm "${DEB_FILE}"
93103

94104
rm -rf /var/lib/apt/lists/*
95105
echo "Done!"

0 commit comments

Comments
 (0)