Skip to content

Commit

Permalink
Merge pull request #26 from ZLLentz/bug_git_safedir
Browse files Browse the repository at this point in the history
BUG: add git safe directory for centrally deployed git repos
  • Loading branch information
ZLLentz committed Apr 11, 2024
2 parents 34a8a8c + 0422746 commit 2c2afc3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/docs_prompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
# Includes a human-readable shorthand, a url to the commit, and the current time and date
THIS_SCRIPT="$(realpath "${0}")"
THIS_DIR="$(dirname "${THIS_SCRIPT}")"
source "${THIS_DIR}"/paths.sh

VERSION="$(git -C "${THIS_DIR}" describe --tags)"
# Safe directory needed to check the git version, only apply once per user.
if ! git config --global --get-all safe.directory | grep "${ANSIBLE_ROOT}" &>/dev/null; then
git config --global --add safe.directory "${ANSIBLE_ROOT}"
echo "Added ${ANSIBLE_ROOT} as a git safe.directory to check the version."
fi
VERSION="$(git -C "${ANSIBLE_ROOT}" describe --tags)"
URL="https://github.com/pcdshub/twincat-bsd-ansible/tree/${VERSION}"

echo "If you made changes, please update the deployment docs (https://confluence.slac.stanford.edu/x/0IsFGg)"
Expand Down

0 comments on commit 2c2afc3

Please sign in to comment.