bump-cask-pr: add --online switch for brew cask audit
				
					
				
			This commit is contained in:
		
							parent
							
								
									7d29054cf2
								
							
						
					
					
						commit
						626e861c73
					
				@ -27,6 +27,8 @@ module Homebrew
 | 
			
		||||
                          "to the cask file."
 | 
			
		||||
      switch "--no-audit",
 | 
			
		||||
             description: "Don't run `brew cask audit` before opening the PR."
 | 
			
		||||
      switch "--online",
 | 
			
		||||
             description: "Run `brew cask audit --online` before opening the PR."
 | 
			
		||||
      switch "--no-style",
 | 
			
		||||
             description: "Don't run `brew cask style --fix` before opening the PR."
 | 
			
		||||
      switch "--no-browse",
 | 
			
		||||
@ -45,6 +47,7 @@ module Homebrew
 | 
			
		||||
             description: "Ignore duplicate open PRs."
 | 
			
		||||
 | 
			
		||||
      conflicts "--dry-run", "--write"
 | 
			
		||||
      conflicts "--no-audit", "--online"
 | 
			
		||||
      named 1
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
@ -225,6 +228,8 @@ module Homebrew
 | 
			
		||||
    if args.dry_run?
 | 
			
		||||
      if args.no_audit?
 | 
			
		||||
        ohai "Skipping `brew cask audit`"
 | 
			
		||||
      elsif args.online?
 | 
			
		||||
        ohai "brew cask audit --online #{cask.sourcefile_path.basename}"
 | 
			
		||||
      else
 | 
			
		||||
        ohai "brew cask audit #{cask.sourcefile_path.basename}"
 | 
			
		||||
      end
 | 
			
		||||
@ -233,6 +238,9 @@ module Homebrew
 | 
			
		||||
    failed_audit = false
 | 
			
		||||
    if args.no_audit?
 | 
			
		||||
      ohai "Skipping `brew cask audit`"
 | 
			
		||||
    elsif args.online?
 | 
			
		||||
      system HOMEBREW_BREW_FILE, "cask", "audit", "--online", cask.sourcefile_path
 | 
			
		||||
      failed_audit = !$CHILD_STATUS.success?
 | 
			
		||||
    else
 | 
			
		||||
      system HOMEBREW_BREW_FILE, "cask", "audit", cask.sourcefile_path
 | 
			
		||||
      failed_audit = !$CHILD_STATUS.success?
 | 
			
		||||
 | 
			
		||||
@ -834,6 +834,8 @@ supplied by the user.
 | 
			
		||||
  When passed with `--write`, generate a new commit after writing changes to the cask file.
 | 
			
		||||
* `--no-audit`:
 | 
			
		||||
  Don't run `brew cask audit` before opening the PR.
 | 
			
		||||
* `--online`:
 | 
			
		||||
  Run `brew cask audit --online` before opening the PR.
 | 
			
		||||
* `--no-style`:
 | 
			
		||||
  Don't run `brew cask style --fix` before opening the PR.
 | 
			
		||||
* `--no-browse`:
 | 
			
		||||
 | 
			
		||||
@ -1157,6 +1157,10 @@ When passed with \fB\-\-write\fR, generate a new commit after writing changes to
 | 
			
		||||
Don\'t run \fBbrew cask audit\fR before opening the PR\.
 | 
			
		||||
.
 | 
			
		||||
.TP
 | 
			
		||||
\fB\-\-online\fR
 | 
			
		||||
Run \fBbrew cask audit \-\-online\fR before opening the PR\.
 | 
			
		||||
.
 | 
			
		||||
.TP
 | 
			
		||||
\fB\-\-no\-style\fR
 | 
			
		||||
Don\'t run \fBbrew cask style \-\-fix\fR before opening the PR\.
 | 
			
		||||
.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user