-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
update.sh: update to latest Homebrew/brew tag. #998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'm not sure I understand what this involves. If this means that the "non-developer" who does Reason: Suppose a user files an issue and some fix is made in the brew repo. But no new tag is created. Then we can't just tell users "do Apologies if I've misunderstood what this PR does. |
We've had a couple quite widespread breakages recently (including the linked kegs migration debacle today of which we're still dealing with the fallout) we definitely need to be more careful at upgrading all users to master. Adding a We didn't say how often tags will be made by the way.
What's so difficult about that.
Slight user confusion when communicating to a single user or a few users is better than "no-commands-run" for
Reverting a tagged commit has no effect on that tag. We don't force push here. I don't see how it's worse than reverting a commit on the master branch when users are updated to the master branch. |
Current coverage is 83.25% (diff: 100%)@@ master #998 diff @@
==========================================
Files 360 340 -20
Lines 15543 14051 -1492
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 11697 11698 +1
+ Misses 3846 2353 -1493
Partials 0 0
|
Really this is a question/debate about rolling release vs. tagged release software development approaches. I agree the tag approach would not make sense for taps (for now, at least) but except for when we've broken something with another change it's extremely rare that there are user fixes that we need to rapidly make changes to fix. In those cases, we can push them out more quickly to |
I like the idea of "tagged release" for brew internals. Very much so. I just was doubtful about the implementation of putting it behind HOMEBREW_DEVELOPER. Instead of having to tell users to do
It's longer and it looks weird to the sort of newbies who are prone to getting confused.
There aren't just these two possibilities. |
@chdiza It's behind |
@jawshooah @reitermarkus A heads up that this will be happening in the next few days as it'll affect you too. |
Library/Homebrew/cmd/update.sh
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a regular install tags aren't fetched, so UPSTREAM_TAG
would be empty here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handled by #1046
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further tweaked the approach to handle if this is empty.
As it currently stands this branch seems problematic due to lack of tags locally. Reproducer on clean VM: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install hub
cd /usr/local/Homebrew
hub checkout https://github.com/Homebrew/brew/pull/998
brew update and that last
It's trying to check out |
@zmwangx Well noticed. We'll need to do a forced- |
Rather than following every change on `master` let’s have non-developer users (i.e. those who have never run a `dev-cmd` or set `HOMEBREW_DEVELOPER`) update between tags. This provides a fairly natural beta (the `master` branch`) and stable (the tags) approach without restricting us to any particular way of managing our tags.
To test the tag update functionality allow setting `HOMEBREW_UPDATE_TO_TAG`.
This broke my setup. I had updated to d5b6ecf about 5-6 hours ago via
These messages worried me so I invoked
This happened every time so I went into
|
@mgol Can I see the output of |
@mgol and also, actually, |
This:
cds to This:
resulted in:
And now |
About the last bit:
So it's empty. |
Just my 2 cents on tag handling - Composer did a very nice thing when going stable. They have 3 update channels:
The other nice thing is that once you update with a specific channel it keeps you on that channel and it explicitly stays what channel it uses the next time you update. This is really nicely working for Composer, not sure if it'd be good for Homebrew. In short I really like the use of non-stable and stable tags which Composer does and hope Homebrew does something like that. PS: |
So how do I get Homebrew to update from 1.0.0 to 1.0.1? I did get the |
In my case it seems as if Homebrew updated correctly to $ brew update
Checking out v1.0.1 in /usr/local/Homebrew...
To checkout v1.0.1 in /usr/local/Homebrew run:
'cd /usr/local/Homebrew && git checkout v1.0.1
Already up-to-date.
$ cd /usr/local/Homebrew && git checkout v1.0.1
Already on 'v1.0.1'
$ brew --version
Homebrew 1.0.0 (git revision a381b; last commit 2016-09-21)
Homebrew/homebrew-core (git revision 48e0; last commit 2016-09-21)
$ cd /usr/local/Homebrew
$ git show-ref --tags | tail -2
d5b6ecfc5078041ddf5f61b259c57f81d5c50fcc refs/tags/1.0.0
a381b597d3ebf40887b50657df269d867a209eb7 refs/tags/1.0.1 |
Ignore this, it was me being an idiot and not remembering to bump the version number in the output. |
brew tests
with your changes locally?Rather than following every change on
master
let’s have non-developer users (i.e. those who have never run adev-cmd
or setHOMEBREW_DEVELOPER
) update between tags.This provides a fairly natural beta (the
master
branch) and stable (the tags) approach without restricting us to any particular way of managing our tags.Also, ensure we always fetch tags and allow forcing tag update functionality by setting
HOMEBREW_UPDATE_TO_TAG
.This shouldn't be merged until after we tag 1.0.0 as 0.9.9 is too old to have users on for now.