Fix spack flake8 to use Travis's target as base when needed
This commit is contained in:
		
				
					committed by
					
						
						Peter Scheibel
					
				
			
			
				
	
			
			
			
						parent
						
							f41103770d
						
					
				
				
					commit
					8e5e36dc0b
				
			@@ -211,7 +211,7 @@ before_script:
 | 
			
		||||
  - git config --global user.name "Test User"
 | 
			
		||||
 | 
			
		||||
  # Need this to be able to compute the list of changed files
 | 
			
		||||
  - git fetch origin develop:develop
 | 
			
		||||
  - git fetch origin ${TRAVIS_BRANCH}:${TRAVIS_BRANCH}
 | 
			
		||||
 | 
			
		||||
  # Set up external deps for build tests, b/c they take too long to compile
 | 
			
		||||
  - if [[ "$TEST_SUITE" == "build" ]]; then
 | 
			
		||||
 
 | 
			
		||||
@@ -96,7 +96,11 @@ def changed_files(args):
 | 
			
		||||
 | 
			
		||||
    git = which('git', required=True)
 | 
			
		||||
 | 
			
		||||
    range = "{0}...".format(args.base)
 | 
			
		||||
    base = args.base
 | 
			
		||||
    if base is None:
 | 
			
		||||
        base = os.environ.get('TRAVIS_BRANCH', 'develop')
 | 
			
		||||
 | 
			
		||||
    range = "{0}...".format(base)
 | 
			
		||||
 | 
			
		||||
    git_args = [
 | 
			
		||||
        # Add changed files committed since branching off of develop
 | 
			
		||||
@@ -193,7 +197,7 @@ def filter_file(source, dest, output=False):
 | 
			
		||||
 | 
			
		||||
def setup_parser(subparser):
 | 
			
		||||
    subparser.add_argument(
 | 
			
		||||
        '-b', '--base', action='store', default='develop',
 | 
			
		||||
        '-b', '--base', action='store', default=None,
 | 
			
		||||
        help="select base branch for collecting list of modified files")
 | 
			
		||||
    subparser.add_argument(
 | 
			
		||||
        '-k', '--keep-temp', action='store_true',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user