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

Simplified update process for casks that have a version number in link stanza #4910

Merged
merged 2 commits into from
Jun 24, 2014
Merged

Simplified update process for casks that have a version number in link stanza #4910

merged 2 commits into from
Jun 24, 2014

Conversation

vitorgalvao
Copy link
Member

Basic change went as follows:

  • Bring version to the top, so it can be reused throughout.
  • Bring sha256 to the top, directly under version.
  • Put a blank like between the previous two and the rest of the cask.1
  • Put another blank line before the cask’s artifacts (as per suggested (not enforced) order for Cask stanzas #4924).
  • Change rest of the cask accordingly to programatically reuse the version number.

This change was currently applied only to casks that have a version number in the link stanza, but it could be useful to apply it to other ones, in the future.

Sloth, platypus, and simpletag are special cases that could benefit from more flexibility in link, in the future, since they point to an always up-to-date download url2, but have a version number in the directory that contains the app.

Sts was left untouched for now, since it has a few extra numbers in the download url that look like they might change when updating, so they need to be checked out further.


1: The logic behind this being grouping the only parts that will need to be changed to increment versions in the future apart from the stanzas that should not need to be touched anymore. The exception was golly, since it needs sha256 declared in two different locations.

2: Simpletag is being changed in this update to use a versioned one.

@radeksimko
Copy link
Contributor

I like it, it makes sense. It would be good to add all the 4 points somewhere to the documentation as well.

@muescha
Copy link
Contributor

muescha commented Jun 16, 2014

How about:

versions '3.4.0', 'e4.3', 'e4.3.1'

  url "http://download.springsource.com/release/STS/#{version[0]}/dist/#{version[1]}/spring-tool-suite-#{version[0]}.RELEASE-#{version[2]}-macosx-cocoa-x86_64.tar.gz"
  homepage 'http://spring.io/tools/sts'

(Or a hash?)

PS:
version points to the first versions array item.

@rolandwalker
Copy link
Contributor

@vitorgalvao , +1.

I mentioned giving you greater flexibility onlink stanzas in Homebrew/homebrew-cask-versions#293 .

@vitorgalvao
Copy link
Member Author

@muescha I considered that, but thought it could be potentially confusing (i.e., the next person updating it would still need to understand the whole cask, in order to make the substitutions), which would somewhat go against the purpose of this change.

Taking a look at the download page, though, it’s easy to see where that second version number comes from

My thinking here would be to go for something like

version '3.5.1'
based_on_eclipse = '4.3.2'

The rest of the details (adding the e and removing the last part where needed in the url) would be taken care of in place. This seems to me like it might be the clearest option.

@rolandwalker Thank you. It seems like we might all be in agreement here. I’ll leave this open a little while longer to see if there are any objections we should consider.

Conflicts:
	Casks/aria-maestosa.rb
	Casks/camed.rb
	Casks/cd-to.rb
	Casks/gurps-character-sheet.rb
	Casks/jaspersoft-studio.rb
	Casks/menubar-countdown.rb
	Casks/mp4tools.rb
	Casks/netlogo.rb
	Casks/opensong.rb
	Casks/simpletag.rb
	Casks/tag.rb
	Casks/unpkg.rb
This was referenced Dec 10, 2014
This was referenced Dec 24, 2014
This was referenced Mar 29, 2015
This was referenced Apr 17, 2015
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants