mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 06:30:27 +03:00 
			
		
		
		
	deploy: wire up --checksum option to rclone functionality
By default `fdroid deploy` uses the checksum to check for changed files. The rclone code should do the same.
This commit is contained in:
		
							parent
							
								
									7c2a0aa6c2
								
							
						
					
					
						commit
						4fabdf9290
					
				
					 1 changed files with 15 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -115,7 +115,12 @@ def update_awsbucket(repo_section, is_index_only=False, verbose=False, quiet=Fal
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
def update_remote_storage_with_rclone(
 | 
			
		||||
    repo_section, awsbucket, is_index_only=False, verbose=False, quiet=False
 | 
			
		||||
    repo_section,
 | 
			
		||||
    awsbucket,
 | 
			
		||||
    is_index_only=False,
 | 
			
		||||
    verbose=False,
 | 
			
		||||
    quiet=False,
 | 
			
		||||
    checksum=False,
 | 
			
		||||
):
 | 
			
		||||
    """Sync the directory `repo_section` (including subdirectories) to configed cloud services.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -205,6 +210,9 @@ def update_remote_storage_with_rclone(
 | 
			
		|||
    if configfilename:
 | 
			
		||||
        rclone_sync_command += ['--config', configfilename]
 | 
			
		||||
 | 
			
		||||
    if checksum:
 | 
			
		||||
        rclone_sync_command.append('--checksum')
 | 
			
		||||
 | 
			
		||||
    if verbose:
 | 
			
		||||
        rclone_sync_command += ['--verbose']
 | 
			
		||||
    elif quiet:
 | 
			
		||||
| 
						 | 
				
			
			@ -1141,7 +1149,12 @@ def main():
 | 
			
		|||
            awsbucket = config['awsbucket']
 | 
			
		||||
            index_only = config.get('awsbucket_index_only')
 | 
			
		||||
            update_remote_storage_with_rclone(
 | 
			
		||||
                repo_section, awsbucket, index_only, options.verbose, options.quiet
 | 
			
		||||
                repo_section,
 | 
			
		||||
                awsbucket,
 | 
			
		||||
                index_only,
 | 
			
		||||
                options.verbose,
 | 
			
		||||
                options.quiet,
 | 
			
		||||
                not options.no_checksum,
 | 
			
		||||
            )
 | 
			
		||||
        if config.get('androidobservatory'):
 | 
			
		||||
            upload_to_android_observatory(repo_section)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue