In some instances we need to tag commits for deployments, however the deployment might be unnecessary if the only file that has been changed in the commit is not app related, so you will be redeploying a no change package.
we can get the latest commit that has changed a specific file type using the following command:
GLOB_PATTERN="-- \apps/* -- \libs/* -- \*.tsx -- \*.ts -- \*.js -- \*.tf -- \*.json -- \*.yml -- \*.yaml"
GLOB_COMMIT=$(git log -n 1 --pretty=format:%H $GLOB_PATTERN)