Skip to content

Instantly share code, notes, and snippets.

@jbickar
Last active April 21, 2020 17:41
Show Gist options
  • Save jbickar/134dddbbd8240f8c94cbb434f4688008 to your computer and use it in GitHub Desktop.
Save jbickar/134dddbbd8240f8c94cbb434f4688008 to your computer and use it in GitHub Desktop.
Check for DB updates
# First, check out the latest tag, or HEAD of the main branch.
# "git describe --abbrev=0 --tags" grabs the most recent lightweight tag
# The first command creates a variable out of that, "$tag"
# That's passed to "git diff", and we're doing a git diff from the current HEAD
# compared with that tag, and targeting the "docroot/" directory.
# Then we're passing that to grep, and searching for a line that starts with
# a plus sign, followed by "function" and "_update".
tag=$(git describe --abbrev=0 --tags); git diff ${tag} docroot/ | grep -E "^\+.*function.*_update"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment