changeset 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 68f799dc4680
children 6f32a6dc2306
files garcon/pypi.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
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 '