diff --git a/scripts/docs_prompt.sh b/scripts/docs_prompt.sh new file mode 100755 index 0000000..4da8fc2 --- /dev/null +++ b/scripts/docs_prompt.sh @@ -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')" diff --git a/scripts/provision_plc.sh b/scripts/provision_plc.sh index 6356e81..bce4699 100755 --- a/scripts/provision_plc.sh +++ b/scripts/provision_plc.sh @@ -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