aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
AgeCommit message (Collapse)Author
2016-02-28test-bot: make bottle stats visible by defaultTim D. Smith
Closes Homebrew/homebrew#49620.
2016-02-26tap: support --quieter flagXu Cheng
Closes Homebrew/homebrew#49551. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-26various: use Tap abstractionXu Cheng
formula_rename and tap_migrations are now handled inside Tap. Closes Homebrew/homebrew#49549. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-25remove update-rubyXu Cheng
Closes Homebrew/homebrew#49523. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-25update-report: fix new_full_name in reportXu Cheng
2016-02-25update-report: refactoringXu Cheng
* Better variable/class name. `update-report` isn't response to actual update. * Use abstraction offered by Reporter and ReproterHub class. * Failure on one tap won't affect migration preformed by other taps. * Simplify logic and prepare for core/formula separation.
2016-02-25update-report: refactoring ReporterHubXu Cheng
* Better variable/class name. * Remove obsolete update_renamed, this is now handled inside each reporter. * Remove obsolete formula file path to name computation, which is also handled by reporter. * Hide low lever implementation detail to offer better abstraction. Use `add(reporter)` instead of `Hash#update` to add new report.
2016-02-25update-report: use tap inside ReporterXu Cheng
* Avoid tons of unnecessary file path manipulation. Use abstraction offered by Tap class if possible. * Handle formula rename/tap migration inside reporter in per tap basis. * Avoid duplicated computation. * Remove redundant/dead code.
2016-02-23list: exclude .github from unbrewedPaul Phillips
Recently added files polluting brew ls --unbrewed results. Closes Homebrew/homebrew#49456. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-02-22update: better handle merge conflicts.Mike McQuaid
When there are merge conflicts we fail pretty hard. This is still possible after this commit but at least we've given Git enough pointers to make it less likely. Closes Homebrew/homebrew#49299. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-19update: fix fork bomb caused by `brew update --help`Xu Cheng
Fixes Homebrew/homebrew#49334. Closes Homebrew/homebrew#49343. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-18update: always checkout master.ilovezfs
This should help to prevent situations where a user accidentally ends up "stranded" in a branch indefinitely. Additionally, the stash is never popped automatically at the end of a successful update, but the stash-pop message is printed if something is stashed. When an interrupt occurs, the original behavior is still in place (switch back to the old branch and revision, and pop the stash), though this could be changed as well. This commit modifies the behavior of both `brew update` and "update-bash.sh" in the manner described above. The idea for this approach is from Mike McQuaid. Issue Homebrew/homebrew#48812 Closes Homebrew/homebrew#48993. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-18update: use GitHub API to avoid unneeded fetches.Mike McQuaid
Check to see if `HEAD` is the same as what we have locally. If it is: don't bother to `git fetch`. Closes Homebrew/homebrew#47888. Closes Homebrew/homebrew#49219. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-16add Tap#formula_file?Xu Cheng
Return true if given path would present a Formula file in this Tap. Accepts both absolute path and relative path (relative to this Tap's path) It offer an abstraction such that caller would not need to worry about low level file system in the tap. It will be used in `brew pull` and `brew update`. Closes Homebrew/homebrew#49191. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-15Promote update-bash to the default updater.Mike McQuaid
Also, rename the existing updater to `update-ruby` to allow using as a fallback. It will eventually be removed. Closes Homebrew/homebrew#49109. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-13style: update rubocop to 0.37.2Dominyk Tiller
Closes Homebrew/homebrew#49084. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-02-12cmd/update-bash.sh: print message on fetch fail.Mike McQuaid
Closes Homebrew/homebrew#49107. Closes Homebrew/homebrew#49105. Closes Homebrew/homebrew#48267. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-02-12update-bash: don't prompt for passwords.Mike McQuaid
We execute too many `git fetch` at once for this to be useful. Just let them fail instead and make it up to users to setup username/password caching or SSH agents.
2016-02-12pull --bump: add auto-detection of devel bumpsAndrew Janke
Closes Homebrew/homebrew#48472. Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-02-11audit: roughly double notability requirements.Mike McQuaid
Closes Homebrew/homebrew#48706.
2016-02-10bottle: do not follow symlink when setting mtimeXu Cheng
Also set atime to mtime, which seems to be a more common practice. Fixes Homebrew/homebrew#49007 Closes Homebrew/homebrew#49027. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-09Audit: Regexp.escape formula namesMisty De Meo
We allow certain special regex characters in formula names, and if those aren't escaped when interpolating them into a regex, they'll be interpreted as special regex characters. This can cause regex compile errors on Ruby 1.8 (for example, with "libxml++3", which has nested match characters), and more subtle matching bugs in general. Refs an issue surfaced in Homebrew/homebrew#48744. Closes Homebrew/homebrew#49005. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2016-02-06Array#count alias didn't always existMisty De Meo
Fixes mistydemeo/tigerbrew#408.
2016-02-04audit: add check for insecure hackage urlsDominyk Tiller
2016-02-03audit: use start_with? to check the name in the descBaptiste Fontaine
2016-02-03pull: fix ambiguity issues for tap migrationsMartin Afanasjew
`Formula[name]` gets called with an unqualified name and thus will throw `TapFormulaAmbiguityError` exceptions (silently ignored) if both the old and the new tap are present and changes for the new tap are pulled before the migrated formulae are removed from the old tap. The result is an empty or incomplete `changed_formulae`, causing issues with pulling the corresponding bottles and possibly other problems, too.
2016-01-31audit: check resource placementDominyk Tiller
2016-01-28update-bash: don't be quiet for git initXu Cheng
The output will help to show git is initialized in the first time. Hence, offer a better UX.
2016-01-28update-bash: git related improvementXu Cheng
* Use git function instead of refreshing bash cache on `git` path. * Better `which_git`: * Take user's setting of `HOMEBREW_GIT` and `GIT` env variable into account. * Always expand git path. * Only check Xcode installation for OS X. Closes Homebrew/homebrew#48508. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-28update-bash: fix git_init_if_necessaryXu Cheng
* Make sure `.git` directory be deleted at any error. So we won't have a stale setup. * Run `git fetch` and `git reset` when initialize git in the first time. Otherwise, we will get error and merging problem afterwards. Closes Homebrew/homebrew#48509. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-27update-bash: fully resolve Git's path in hash.Mike McQuaid
Otherwise Bash can cache a relative PATH and then get upset when it changes directory and cannot find it any more. Closes Homebrew/homebrew#48493. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-26bin/brew: put commands into 'homebrew-' namespaceMartin Afanasjew
This should help to avoid collisions with external commands and other shell functions in the future and is closer to what we do in Ruby, where commands are namespaced by being methods of the `Homebrew` module.
2016-01-26update-bash: stop handling command name argumentMartin Afanasjew
2016-01-26update-bash: discourage direct useMartin Afanasjew
Remove the executable bit from the file to make it clear it is not supposed to be executed directly. This should make the shebang line and the early check also unnecessary.
2016-01-26update-report: don't duplicate "already updated".Mike McQuaid
This would be displayed more than once when verbose output was enabled. Closes Homebrew/homebrew#48469.
2016-01-26bottle: clear tab cacheXu Cheng
We cached the tab file content during formula loading. Let's discard them, so we can read tab content after relocation
2016-01-26bottle: ensure to restore relocation on text filesXu Cheng
2016-01-25update-bash: release to non-developers.Mike McQuaid
Allow people to run this command (so we can ask people to test it) without having to set `HOMEBREW_DEVELOPER`. Closes Homebrew/homebrew#48260. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2016-01-25audit: avoid false positive pkgshare problemsBaptiste Fontaine
2016-01-25audit: warn once about deprecated *Formula classesBaptiste Fontaine
GithubGistFormula inherits from ScriptFileFormula so a problem is added for each one instead of the first only.
2016-01-21update-bash: use array for QUIET_ARGSXu Cheng
Per @UniqMartin's advice, avoid disabling shellcheck rules. Closes Homebrew/homebrew#48286. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-01-21update-bash: explicitly tag local variablesXu Cheng
2016-01-21update-bash: handle option flags like -vdXu Cheng
Per @UniqMartin's advice, the original code will fail to handle flags like `-vd`, because once a case is handled, no other cases are evaluate.
2016-01-21update-bash: don't stash for --simulate-from-current-branchXu Cheng
When invoking --simulate-from-current-branch, we shouldn't do any file manipulation.
2016-01-21update-bash: fix revision variable settingXu Cheng
* only set HOMEBREW_UPDATE_BEFORE inside pull instead of fetch. * fix HOMEBREW_UPDATE_BEFORE/AFTER variable settings. They should be set to INITIAL_REVISION and CURRENT_REVISION correspondingly. * avoid unnecessary duplicated shellout. * remove unused variable.
2016-01-21update-bash: kill all of subprocess on interrupt when fetchingXu Cheng
2016-01-21update-bash: improve reset_on_interruptXu Cheng
* make sure exit after reset. * more wide guardian range. We should trap reset_on_interrupt as soon as we are about to change any files. * check INITIAL_BRANCH against UPSTREAM_BRANCH
2016-01-21update: implement rename_taps_dir_if_necessary in bashXu Cheng
rename_taps_dir_if_necessary must be performed before actual update. Otherwise, it will report that `HOMEBREW_UPDAET_BEFORE<REPO_VAR>` is unset.
2016-01-21update: improve repo_varXu Cheng
* use HOMEBREW_REPOSITORY instead of HOMEBREW_PREFIX * better performance: * update-bash: avoid shellout * update-report: use strip_prefix and tr * more robust: * explicitly handle the case when repo is HOMEBREW_REPOSITORY to avoid to handle the trailing backslash. * handle both lower case and upper case when stripping non alpha and digital characters.
2016-01-21update-bash: avoid shellout for stripping prefixXu Cheng