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

Switch spotify from latest to 1.0.68.407.g6864aaaf-37 #41520

Closed
wants to merge 1 commit into from
Closed

Switch spotify from latest to 1.0.68.407.g6864aaaf-37 #41520

wants to merge 1 commit into from

Conversation

sparhomenko
Copy link
Contributor

@sparhomenko sparhomenko commented Dec 1, 2017

After making all changes to the

  • brew cask audit --download {{cask_file}} is error-free.
  • brew cask style --fix {{cask_file}} reports no offenses.
  • The commit message includes the cask’s name and version.

This switches Spotify cask from :latest and :no_check to the current version. The versioned download is the same as the one used by the auto-updater, it seems to have the same content as the offline installer but without Spotify.app root dir. For further updates the version can typically be found in CFBundleVersion property of /Applications/Spotify.app/Contents/Info.plist after auto-updating. In rare cases of a mismatch - eg. at the moment CFBundleVersion is 1.0.68.407.g6864aaaf-36 but the download is 1.0.68.407.g6864aaaf-37 - it can be found by inspecting the app calls with a proxy tool.

I've tried (hard) to find an appcast without any success: app seems to get it via an encrypted TCP connection to one of the "ap" servers, and they decided to stop providing release notes. So although automating version upgrades for this cask at the moment doesn't look easy, I've decided to give this a try since this is one of the few remaining popular casks with both :latest and auto_updates that won't work well with the shiny new brew cask upgrade.

Please feel free to weigh in, I would love to get maintainers' input before looking into other :latest casks I use.

@commitay
Copy link
Contributor

commitay commented Dec 1, 2017

How would we even know what the new version is when it changes? Without inspecting the app?

@sparhomenko
Copy link
Contributor Author

sparhomenko commented Dec 1, 2017

Don't think there currently is a way - as mentioned in the PR description I wasn't able to find anything resembling an appcast. So the updates for this cask are likely not easily automatable. I guess it's a general question of what is currently endorsed more when appcast is not available: :latest or versioned.

@commitay
Copy link
Contributor

commitay commented Dec 1, 2017

Without an appcast that publishes the version we can't merge this.

Also things like this: app '.', target: 'Spotify.app' we try to avoid unless absolutely necessary.

Parsing plists and other similar approaches for versioning Casks have been attempted previously but they are all to difficult to reliably (and easily) implement.

I appreciate that you've put work into trying to version this but it isn't practical.


RE: the list in Homebrew/brew#3396 (comment)

Several of those Casks are deliberately unversioned even if versioned downloads or appcasts exist.

A couple of them should probably have auto_updates true removed.

@sparhomenko
Copy link
Contributor Author

sparhomenko commented Dec 1, 2017

I see, thanks for the input. It might be good to update Adding a Cask doc - at the moment it recommends using :latest only if an unversioned download is not available.

@sparhomenko sparhomenko closed this Dec 1, 2017
@commitay
Copy link
Contributor

commitay commented Dec 1, 2017

at the moment it recommends using :latest only if only an unversioned download is available.

This is generally correct, we prefer versioned downloads unless they are impractical / regularly break, etc.

Edit: we sometimes don't know until after they have been added that keeping them versioned is impractical.

This is also overridden by other docs depending on the Cask, i.e. for nightlys:

https://github.com/caskroom/homebrew-versions/blob/master/CONTRIBUTING.md#nightly-builds-nightlies

For Casks of nightlies, version, sha256, and url change frequently, making the Cask constantly outdated. To alleviate having to regularly update them, the use of a url do block in conjunction with version :latest and sha256 :no_check is encouraged, to ensure the latest version is always fetched.

@sparhomenko
Copy link
Contributor Author

sparhomenko commented Dec 1, 2017

I guess the desire to make it versioned is mostly triggered by the decision in Homebrew/brew#3396 to include :latest into brew cask upgrade --greedy, i.e. not supporting brew cu -a behaviour. Normally it's minor annoyance - upgrade redownloads some casks even when it's not needed - but here it actually leads to a downgrade since :latest currently means 1.0.67.582.g19436fa3-17. So my scheduled brew cask upgrade --greedy ends up in a daily fight with the auto-updater.

This is generally correct, we prefer versioned downloads unless they are impractical / regularly break, etc.

My comment on the doc was meant to be more specific - if not having an appcast that publishes the version makes it impractical to use versioned cask when :latest is available it might be worthwhile to mention in that doc to prevent PRs like mine.

@Homebrew Homebrew locked and limited conversation to collaborators May 9, 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.

2 participants