Skip to content
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

downloads: support 32-bit/64-bit windows links #571

Merged
merged 1 commit into from
Aug 18, 2015

Conversation

dscho
Copy link
Member

@dscho dscho commented Aug 18, 2015

With the switch to the MSYS2 backend for the Git for Windows project
the opportunity arose to support both 32-bit and 64-bit builds. In
additon to those 32-bit and 64-bit builds Git for Windows now ships
with portable releases as well. So it makes sense to display all those
links on the download page. Since this behavior differs from the mac
platform would be best to introduce a new download page for the windows
platform.

The naming convention for Git for Windows builds changed too, so the
rake downloads task had to be adapted. It now parses the Git for
Windows
release file properly and also extracts the bitness and the
portable information of the release file. That bitness and the portable
information is then appended to the platform when storing the release
information in the database.

To provide an automatic download for the latest Git for Windows release
in the correct bitness parsing of the user agent in the download
controller was added. The view was updated to show the current download
and then list the other options as well.

To associate the latest Windows release (which might have 4 digits) to the
corresponding Git version, we look only at the first 3 digits (which match
the Git version). Thanks to the order in which the GitHub API delivers the
releases, this means that the last one wins, as it should be. Example: if
2.5.0 was uploaded, and later 2.5.0.2 was uploaded, then 2.5.0.2 is added
as a Download later than 2.5.0, and associated with the Git version
2.5.0. So even if it might not be completely obvious from a quick glance,
the logic is sound.

[jes: rebased to current upstream; accounted for 3-digit versions,
commented on the 4 -> 3 digits reduction to match up Git for Windows to
Git versions]

Signed-off-by: 마누엘 [email protected]
Signed-off-by: Johannes Schindelin [email protected]

With the switch to the *MSYS2* backend for the *Git for Windows* project
the opportunity arose to support both `32-bit` and `64-bit` builds. In
additon to those `32-bit` and `64-bit` builds *Git for Windows* now ships
with portable releases as well. So it makes sense to display all those
links on the download page. Since this behavior differs from the `mac`
platform would be best to introduce a new download page for the `windows`
platform.

The naming convention for *Git for Windows* builds changed too, so the
`rake downloads` task had to be adapted. It now parses the *Git for
Windows* release file properly and also extracts the `bitness` and the
portable information of the release file. That `bitness` and the portable
information is then appended to the platform when storing the release
information in the database.

To provide an automatic download for the latest *Git for Windows* release
in the correct `bitness` parsing of the user agent in the download
controller was added. The view was updated to show the current download
and then list the other options as well.

To associate the latest Windows release (which might have 4 digits) to the
corresponding Git version, we look only at the first 3 digits (which match
the Git version). Thanks to the order in which the GitHub API delivers the
releases, this means that the last one wins, as it should be. Example: if
2.5.0 was uploaded, and later 2.5.0.2 was uploaded, then 2.5.0.2 is added
as a `Download` *later* than 2.5.0, and associated with the Git version
2.5.0. So even if it might not be completely obvious from a quick glance,
the logic is sound.

[jes: rebased to current upstream; accounted for 3-digit versions,
commented on the 4 -> 3 digits reduction to match up Git for Windows to
Git versions]

Signed-off-by: 마누엘 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
@peff
Copy link
Member

peff commented Aug 18, 2015

@dscho Is this ready to merge in your opinion? What's the timing like for releasing the new version of Git for Windows?

@dscho
Copy link
Member Author

dscho commented Aug 18, 2015

@peff this is almost ready. I am re-building the installers because of one last-minute bug fix (git-for-windows/git#282). I have a fix, it should be up momentarily, and then we're good to go (I still have to write the announcement, though).

Will keep you posted, expect news within 15 minutes.

@dscho
Copy link
Member Author

dscho commented Aug 18, 2015

@peff Also, I would be really indebted if you could have another look at the Ruby code because my Ruby-fu is not as good as my C and Java-fu...

@dscho
Copy link
Member Author

dscho commented Aug 18, 2015

Okay, the new installers are uploaded (and briefly tested before that). Ready to go.

@dscho
Copy link
Member Author

dscho commented Aug 18, 2015

@peff once you merge, could you also close #535, please?

@peff
Copy link
Member

peff commented Aug 18, 2015

I am absolutely not the best person to be commenting on ruby code. :trollface:
I don't see anything objectionable, though. I'm getting this running locally on my box to make sure it looks good, and then I'll merge.

@peff
Copy link
Member

peff commented Aug 18, 2015

Hmm, when I run it locally, going to /downloads/win just shows me the same page as /downloads.

@dscho
Copy link
Member Author

dscho commented Aug 18, 2015

Did you update the local_index? My box is still at work, but @shiftkey claimed that after getting the man pages imported, everything worked alright for him...

@peff
Copy link
Member

peff commented Aug 18, 2015

Ah, no, the problem was I didn't do the rake download task. It's working now. Sorry for the noise.

@dscho
Copy link
Member Author

dscho commented Aug 18, 2015

Ah, okay!

@peff
Copy link
Member

peff commented Aug 18, 2015

OK, this is looking good to me. I'm going to merge to coincide with the release announcement for Git for Windows. But @schacon or @bry4n, please feel free to review and suggest any other fixes, and we can follow up with another PR to address them.

peff added a commit that referenced this pull request Aug 18, 2015
downloads: support 32-bit/64-bit windows links
@peff peff merged commit c479758 into git:master Aug 18, 2015
@dscho dscho deleted the windows-bitness-links branch August 18, 2015 14:46
@dscho
Copy link
Member Author

dscho commented Aug 18, 2015

Thanks!!!

@dscho
Copy link
Member Author

dscho commented Aug 18, 2015

Oh BTW is there any chance to run rake downloads when deploying?

@peff
Copy link
Member

peff commented Aug 18, 2015

I believe that rake downloads is run out of a cron job. Once per hour maybe? I don't actually have access to the server, but I think it auto-deploys and the new versions should be out within an hour or so. @schacon can say more, and should probably be waking up soon.

@dscho
Copy link
Member Author

dscho commented Aug 18, 2015

Okay, no problem, 1h is what I'll spend easily on writing that mail...

@peff
Copy link
Member

peff commented Aug 18, 2015

japbcvpavbzau9dbuaxf

I don't usually do GitHub PRs, but they're supposed to involve a lot of GIF memes, right?

@bry4n
Copy link
Member

bry4n commented Aug 18, 2015

LGTM!

@dscho
Copy link
Member Author

dscho commented Aug 18, 2015

i-dont-usually-do-github-prs

@peff
Copy link
Member

peff commented Aug 18, 2015

Amazing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants