Commits

abudden committed 5cad2b1

Verify return code from all subprocess calls (distribution script).

  • Participants
  • Parent commits b651100

Comments (0)

Files changed (1)

File dist/make_taghighlight_release.py

     args = HG + clean_info
     p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     (stdout,stderr) = p.communicate()
+    if p.returncode > 0:
+        sys.exit(p.returncode)
 
     status_lines = stdout
     if len(status_lines) > 0:
     args = pyexe + [os.path.join(pyinstaller_path, 'Build.py'), '-y', 'TagHighlight.spec']
     p = subprocess.Popen(args)#, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     (stdout,stderr) = p.communicate()
+    if p.returncode > 0:
+        sys.exit(p.returncode)
     zipf = zipfile.ZipFile(os.path.join(vimfiles_dir,'dist',zipfilename), 'w')
     for f in Rglob(os.path.join(vimfiles_dir,'plugin/TagHighlight/Compiled/'+platform_dir),'*'):
         dirname = os.path.dirname(os.path.relpath(f,vimfiles_dir))
     args = HG+['commit','-m','Release build {0}'.format(r)]
     p = subprocess.Popen(args)
     (stdout,stderr) = p.communicate()
+    if p.returncode > 0:
+        sys.exit(p.returncode)
     args = HG+['tag','taghighlight-release-{0}'.format(r)]
     p = subprocess.Popen(args)
     (stdout,stderr) = p.communicate()
+    if p.returncode > 0:
+        sys.exit(p.returncode)
     args = HG+['push']
     p = subprocess.Popen(args)
     (stdout,stderr) = p.communicate()
+    if p.returncode > 0:
+        sys.exit(p.returncode)
 
 def PublishReleaseVersion():
     # TODO