In formulas:
url required to be before version?#{version} not be used in url?In this formula, #{version} is used within the url:
class CloudbreakShell < Formula
desc "CLI shell for the Cloudbreak project"
homepage "https://github.com/sequenceiq/cloudbreak/tree/master/shell"
version "1.4.0-rc.15"
url "https://s3-eu-west-1.amazonaws.com/maven.sequenceiq.com/releases/com/sequenceiq/cloudbreak-shell/#{version}/cloudbreak-shell-#{version}.jar"
It installs properly, but audit returns:
$ brew audit --online --strict cloudbreak-shell
cloudbreak-shell:
* `url` (line 5) should be put before `version` (line 4)
Error: 1 problem in 1 formula
If version is moved after url then the url will not include version so receives a 404:
$ brew install cloudbreak-shell
==> Downloading https://s3-eu-west-1.amazonaws.com/maven.sequenceiq.com/releases/com/sequenceiq/cloudbreak-shell//cloudbreak-shell-.jar
curl: (22) The requested URL returned error: 404 Not Found
We prefer for URLs to be easy to copy and paste, thus to include the verbatim URL. For almost all URLs, version doesn't need to be specified at all because it is automatically detected from the URL.
This translates to this advice:
url line.version line after that, if and only if the version isn't automatically detected from the URL.We realize this is a bit different from most other package managers, but that's the Homebrew way. 馃樃
Most helpful comment
We prefer for URLs to be easy to copy and paste, thus to include the verbatim URL. For almost all URLs,
versiondoesn't need to be specified at all because it is automatically detected from the URL.This translates to this advice:
urlline.versionline after that, if and only if the version isn't automatically detected from the URL.We realize this is a bit different from most other package managers, but that's the Homebrew way. 馃樃