pre-upload: check_manifests: improve check significantly

A number of improvements:
- Read the Manifest from the commit, not from the filesystem
- Allow comments/blank lines in the middle
- Make sure there is always a newline at the end of the file
- Disallow blank lines at the start/end of the file

TEST=unittests pass

Change-Id: I91d4d7b283ac08410e83d653dacb981a07524fca
Commit-Ready: Mike Frysinger <>
Tested-by: Mike Frysinger <>
Reviewed-by: Ben Chan <>
2 files changed