Browse Source

Don't run transifex push in pull requests

Rafał Pitoń 7 years ago
parent
commit
46cc63bb58

+ 1 - 1
.travis.yml

@@ -21,4 +21,4 @@ script:
 after_success:
   - coveralls
   - sudo echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = '"$TRANSIFEX_USER"$'\npassword = '"$TRANSIFEX_PASSWORD"$'\n' > ~/.transifexrc
-  - tx push -s
+  - if [ "$TRAVIS_EVENT_TYPE" != "pull_request" ]; then tx push -s

+ 2 - 2
misago/users/management/commands/buildactivepostersranking.py

@@ -7,6 +7,6 @@ class Command(BaseCommand):
     help = 'Builds active posters ranking'
 
     def handle(self, *args, **options):
-        self.stdout.write('\n\nBuilding active posters ranking...')
+        self.stdout.write("\n\nBuilding active posters ranking...")
         build_active_posters_ranking()
-        self.stdout.write('Done!')
+        self.stdout.write("Done!")

+ 2 - 2
misago/users/management/commands/invalidatebans.py

@@ -20,7 +20,7 @@ class Command(BaseCommand):
         queryset = queryset.filter(expires_on__lt=timezone.now())
 
         expired_count = queryset.update(is_checked=False)
-        self.stdout.write('Bans invalidated: %s' % expired_count)
+        self.stdout.write("Bans invalidated: %s" % expired_count)
 
     def handle_bans_caches(self):
         queryset = BanCache.objects.filter(expires_on__lt=timezone.now())
@@ -34,4 +34,4 @@ class Command(BaseCommand):
         expired_count += queryset.count()
         queryset.delete()
 
-        self.stdout.write('Ban caches emptied: %s' % expired_count)
+        self.stdout.write("Ban caches emptied: %s" % expired_count)