Skip to content

Commit

Permalink
hardcode gitconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Golaszewski committed Nov 1, 2024
1 parent 657d1d5 commit 072a204
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
6 changes: 6 additions & 0 deletions build-scripts/addons/repositories.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 2 additions & 7 deletions snap/hooks/install
Original file line number Diff line number Diff line change
Expand Up @@ -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"

0 comments on commit 072a204

Please sign in to comment.