Last active
May 5, 2019 18:53
-
-
Save sliekens/53713fcdb81a2fa07d6d7403efce8221 to your computer and use it in GitHub Desktop.
CI Scripts
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
# Check the working directory for modified files | |
# Exit with an error if there are any | |
$modified = git ls-files --modified | |
if ($modified -ne $null) { | |
Write-Error "Working directory contains modified files: $modified" | |
exit 1 | |
} |
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
# Check for untracked files that are not covered by Git exclusions | |
# (.git/info/exclude, .gitignore in each directory, and the user’s global exclusion file.) | |
# Exit with an error if there are any | |
$untracked = git ls-files --others --exclude-standard | |
if ($untracked -ne $null) { | |
Write-Error "Commit these files or add them to gitignore: $untracked" | |
exit 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment