From 072a204230cdab6a27ba4b2ec890147e24eb048c Mon Sep 17 00:00:00 2001 From: Maciej Golaszewski Date: Fri, 1 Nov 2024 14:55:35 +0100 Subject: [PATCH] hardcode gitconfig --- build-scripts/addons/repositories.sh | 6 ++++++ snap/hooks/install | 9 ++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/build-scripts/addons/repositories.sh b/build-scripts/addons/repositories.sh index 3108a16638..0b7f91b0a8 100755 --- a/build-scripts/addons/repositories.sh +++ b/build-scripts/addons/repositories.sh @@ -31,3 +31,9 @@ done echo "${ADDONS_REPOS_ENABLED}" > addons/.auto-add cp -r "addons" "${INSTALL}/addons" + +cat > ${INSTALL}/gitconfig << EOF +[safe] + directory = /snap/microk8s/current/addons/community/.git + +EOF diff --git a/snap/hooks/install b/snap/hooks/install index a60f5459d8..3b35489c3c 100755 --- a/snap/hooks/install +++ b/snap/hooks/install @@ -148,12 +148,7 @@ then touch ${SNAP_DATA}/var/lock/low-memory-guard.lock fi -SNAP_CURRENT=`echo "${SNAP}" | sed -e "s,${SNAP_REVISION},current,"` -# create git config file -cat > ${SNAP_COMMON}/.gitconfig << EOF -[safe] - directory = ${SNAP_CURRENT}/addons/community/.git - -EOF +# copy git config +cp ${SNAP}/gitconfig ${SNAP_COMMON}/.gitconfig touch "${SNAP_DATA}/var/lock/installed.lock"