diff garcon/pypi.py @ 1001:112ff1ab110c

cm: Only commit admin assets if they have changed.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 21 Nov 2017 10:59:47 -0800
parents bd269692dbb4
children 2e5c5d33d62c
line wrap: on
line diff
--- a/garcon/pypi.py	Tue Nov 21 10:52:51 2017 -0800
+++ b/garcon/pypi.py	Tue Nov 21 10:59:47 2017 -0800
@@ -31,8 +31,12 @@
 
     if not local_only:
         if commit_assets:
-            run('hg commit piecrust/admin/static '
-                '-m "admin: Regenerate FoodTruck assets."')
+            res = run('hg status piecrust/admin/static')
+            if not res:
+                return
+            if res.stdout.strip() != '':
+                run('hg commit piecrust/admin/static '
+                    '-m "admin: Regenerate FoodTruck assets."')
 
         # Submit the CHANGELOG.
         run('hg commit CHANGELOG.rst docs/pages/support/changelog.md '