Created
November 27, 2019 20:13
-
-
Save AvnerCohen/3401cc369b92b9948560f19daa9ed151 to your computer and use it in GitHub Desktop.
Show List of files changed since last commit - allow to feed that into CI operations that needs some optimization, say linting on YAMLs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) | |
git diff --name-only --diff-filter=ACM $LATEST_TAG HEAD | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Filtering for only YAMLs, for example: