def upload(self): # Make sure we have internet if not internetWorking(): logger.info('There does not seem to be internet here, check your connection') return logger.debug('Start upload') self.build_path = self.deploy_path self.clean() self.build() self.plugin_manager.preDeploy(self) totalFiles = self.deployment_engine.deploy() changedFiles = [r for r in totalFiles if r['changed']] self.plugin_manager.postDeploy(self) # Display done message and some statistics logger.info('\nDone\n') logger.info('%s total files with a size of %s' % (len(totalFiles), fileSize(sum([r['size'] for r in totalFiles])))) logger.info('%s changed files with a size of %s' % (len(changedFiles), fileSize(sum([r['size'] for r in changedFiles])))) logger.info('\nhttp://%s\n' % self.config.get('aws-bucket-website')) #TODO: Fix
def upload(self): self.prepare() # Plugins may actually update those values afterwards self.cache_control = self.MAX_CACHE_EXPIRATION if self.is_fingerprinted else self.DEFAULT_CACHE_EXPIRATION self.content_encoding = 'gzip' if self.is_compressed else None self.content_length = len(self.payload()) self.engine.site.plugin_manager.preDeployFile(self) remote_changed = self.remote_changed() if remote_changed: self.do_upload() self.total_bytes_uploaded = self.total_bytes op1 = '+' if remote_changed else '-' op2 = ' (%s compressed)' % (fileSize(len(self.payload()))) if self.is_compressed else '' # logger.warning("deploy.progress %s", self.engine.progress()) ipc.signal("deploy.progress", { "progress": self.engine.progress(), "fileName": self.path }) logger.info('%s %s - %s%s' % (op1, self.path, fileSize(len(self.data())), op2)) return {'changed': remote_changed, 'size': len(self.payload())}
def upload(self): self.prepare() # Plugins may actually update those values afterwards self.cache_control = self.MAX_CACHE_EXPIRATION if self.is_fingerprinted else self.DEFAULT_CACHE_EXPIRATION self.content_encoding = 'gzip' if self.is_compressed else None self.content_length = len(self.payload()) self.engine.site.plugin_manager.preDeployFile(self) remote_changed = self.remote_changed() if remote_changed: self.do_upload() self.total_bytes_uploaded = self.total_bytes op1 = '+' if remote_changed else '-' op2 = ' (%s compressed)' % (fileSize(len( self.payload()))) if self.is_compressed else '' # logger.warning("deploy.progress %s", self.engine.progress()) ipc.signal("deploy.progress", { "progress": self.engine.progress(), "fileName": self.path }) logger.info('%s %s - %s%s' % (op1, self.path, fileSize(len(self.data())), op2)) return {'changed': remote_changed, 'size': len(self.payload())}
def upload(self): # Make sure we have internet if not internetWorking(): logger.info( 'There does not seem to be internet here, check your connection' ) return logger.debug('Start upload') self.build_path = self.deploy_path self.clean() self.build() self.plugin_manager.preDeploy(self) totalFiles = self.deployment_engine.deploy() changedFiles = [r for r in totalFiles if r['changed']] self.plugin_manager.postDeploy(self) # Display done message and some statistics logger.info('\nDone\n') logger.info( '%s total files with a size of %s' % (len(totalFiles), fileSize(sum([r['size'] for r in totalFiles])))) logger.info( '%s changed files with a size of %s' % (len(changedFiles), fileSize(sum([r['size'] for r in changedFiles])))) logger.info('\nhttp://%s\n' % self.config.get('aws-bucket-website')) #TODO: Fix