mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	Include handlebars templates in build-local-server-tarball
update-prod-static needs DEBUG=False. This also replaces our local_settings.py before generating anything included in the tarball. (imported from commit 890cd9d1a44acfd2c20e1662e0c68132c633d1b3)
This commit is contained in:
		@@ -20,6 +20,16 @@ git archive -o $TARBALL --prefix=zulip-server/ HEAD
 | 
				
			|||||||
git checkout-index -f -a --prefix $TMP_CHECKOUT
 | 
					git checkout-index -f -a --prefix $TMP_CHECKOUT
 | 
				
			||||||
cd $TMP_CHECKOUT
 | 
					cd $TMP_CHECKOUT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Use default settings so there is no chance of leaking secrets
 | 
				
			||||||
 | 
					cp zproject/local_settings_template.py zproject/local_settings.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Some settings need values for it to work
 | 
				
			||||||
 | 
					cat >> zproject/local_settings.py <<EOF
 | 
				
			||||||
 | 
					DEBUG = False
 | 
				
			||||||
 | 
					LOCAL_DATABASE_PASSWORD = ''
 | 
				
			||||||
 | 
					SECRET_KEY = 'not_used_here'
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# update-prod-static generates the prod-static directory.
 | 
					# update-prod-static generates the prod-static directory.
 | 
				
			||||||
# See COLLECTSTATIC in settings.py
 | 
					# See COLLECTSTATIC in settings.py
 | 
				
			||||||
./tools/update-prod-static
 | 
					./tools/update-prod-static
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,8 +28,10 @@ from local_settings import *
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
SERVER_GENERATION = int(time.time())
 | 
					SERVER_GENERATION = int(time.time())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Uncomment end of next line to test JS/CSS minification.
 | 
					if not 'DEBUG' in globals():
 | 
				
			||||||
DEBUG = not DEPLOYED # and platform.node() != 'your-machine'
 | 
					    # Uncomment end of next line to test JS/CSS minification.
 | 
				
			||||||
 | 
					    DEBUG = not DEPLOYED # and platform.node() != 'your-machine'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
TEMPLATE_DEBUG = DEBUG
 | 
					TEMPLATE_DEBUG = DEBUG
 | 
				
			||||||
TEST_SUITE = False
 | 
					TEST_SUITE = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -297,10 +299,7 @@ STATIC_URL = '/static/'
 | 
				
			|||||||
# here so that urls.py can read it.
 | 
					# here so that urls.py can read it.
 | 
				
			||||||
PIPELINE = not DEBUG
 | 
					PIPELINE = not DEBUG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Use prod settings if exporting static files in build-local-server-tarball
 | 
					if DEBUG:
 | 
				
			||||||
COLLECTSTATIC = 'manage.py' in sys.argv[0] and (len(sys.argv) > 1 and sys.argv[1] == 'collectstatic')
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if DEBUG and not COLLECTSTATIC:
 | 
					 | 
				
			||||||
    STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
 | 
					    STATICFILES_STORAGE = 'pipeline.storage.PipelineStorage'
 | 
				
			||||||
    STATICFILES_FINDERS = (
 | 
					    STATICFILES_FINDERS = (
 | 
				
			||||||
        'django.contrib.staticfiles.finders.AppDirectoriesFinder',
 | 
					        'django.contrib.staticfiles.finders.AppDirectoriesFinder',
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user