diff options
author | tobrun <tobrun.van.nuland@gmail.com> | 2019-03-20 18:54:34 +0100 |
---|---|---|
committer | tobrun <tobrun.van.nuland@gmail.com> | 2019-03-22 18:15:58 +0100 |
commit | e8e5646cbbe3a5e7ffdba11e0550c7625b3c362c (patch) | |
tree | 0489d025fb70ee47afddab0a926aa97d5d5f9d84 /platform/android/scripts/validate-license.py | |
parent | db56d8f03e9ec368f20805255da633e770895604 (diff) | |
download | qtlocation-mapboxgl-upstream/tvn-validate-license-gen-with-nitpick.tar.gz |
[android] - validate license generatrion with nitpick on CIupstream/tvn-validate-license-gen-with-nitpick
Diffstat (limited to 'platform/android/scripts/validate-license.py')
-rw-r--r-- | platform/android/scripts/validate-license.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/platform/android/scripts/validate-license.py b/platform/android/scripts/validate-license.py new file mode 100644 index 0000000000..365d7ac265 --- /dev/null +++ b/platform/android/scripts/validate-license.py @@ -0,0 +1,17 @@ +#!/usr/bin/python + +from subprocess import call +from subprocess import Popen, PIPE +import sys + +## Run license generation +call('cd ../../ && make android-license', shell=True) + +## Git diff changes +p = Popen(['git', 'diff', '--name-only', 'LICENSE.md'], stdin=PIPE, stdout=PIPE, stderr=PIPE) +output, err = p.communicate(b"input data that is passed to subprocess' stdin") +if "platform/android/LICENSE.md" in output: + raise ValueError("""An error ocurred while validating the license generation. + Changes were detected to the license generation output + but weren't commited. Run make android-license and + commit the changeset to make this validation pass.""")
\ No newline at end of file |