Skip to content

Commit

Permalink
ENH: prompt user to update deployment docs, providing the necessary i…
Browse files Browse the repository at this point in the history
…nfo to do so
  • Loading branch information
ZLLentz committed Mar 26, 2024
1 parent 24b4a11 commit 2f27af2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/docs_prompt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# Get version info for inclusion on https://confluence.slac.stanford.edu/x/0IsFGg
# 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}")"

VERSION="$(git -C "${THIS_DIR}" 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)"
echo "TcBSD Ansible Version: ${VERSION}"
echo "Link commit URL: ${URL}"
echo "PLC Updated on: $(date +'%b %d, %Y')"
3 changes: 3 additions & 0 deletions scripts/provision_plc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,6 @@ ansible-playbook "${ANSIBLE_ROOT}/tcbsd-provision-playbook.yaml" --extra-vars "t

# Stop the ssh agent if we started it here
ssh_agent_helper_cleanup

# Prompt to update deployment docs
"${THIS_DIR}"/docs_prompt.sh

0 comments on commit 2f27af2

Please sign in to comment.