Skip to content

Instantly share code, notes, and snippets.

@lpenz
Created February 21, 2016 12:22
Show Gist options
  • Save lpenz/98dbfb57dbe67730292b to your computer and use it in GitHub Desktop.
Save lpenz/98dbfb57dbe67730292b to your computer and use it in GitHub Desktop.
Test .gitignore in travis
script:
- true TESTS RUN HERE
- true Test if we .gitignore test files
- TMP=$(tempfile)
- git ls-files . --exclude-standard --others | tee "$TMP"
- if test -s "$TMP"; then false; else true; fi
- true Test if we .gitignore any tracked files
- git ls-files -i --exclude-standard | tee "$TMP"
- if test -s "$TMP"; then false; else true; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment