Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
9dca10f9
Commit
9dca10f9
authored
8 years ago
by
ilovezfs
Browse files
Options
Downloads
Patches
Plain Diff
audit: whitelist unstable versions already in core
also allow higher stable versions with the same version prefix
parent
1442a0aa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/dev-cmd/audit.rb
+37
-1
37 additions, 1 deletion
Library/Homebrew/dev-cmd/audit.rb
with
37 additions
and
1 deletion
Library/Homebrew/dev-cmd/audit.rb
+
37
−
1
View file @
9dca10f9
...
...
@@ -678,11 +678,47 @@ class FormulaAuditor
end
end
unstable_whitelist
=
%w[
aalib 1.4rc5
automysqlbackup 3.0-rc6
aview 1.3.0rc1
distcc 3.2rc1
elm-format 0.5.2-alpha
ftgl 2.1.3-rc5
hidapi 0.8.0-rc1
libcaca 0.99b19
premake 4.4-beta5
pwnat 0.3-beta
pxz 4.999.9
recode 3.7-beta2
speexdsp 1.2rc3
sqoop 1.4.6
tcptraceroute 1.5beta7
testssl 2.8rc3
tiny-fugue 5.0b8
vbindiff 3.0_beta4
]
.
each_slice
(
2
).
to_a
.
map
do
|
formula
,
version
|
[
formula
,
version
.
sub
(
/\d+$/
,
""
)]
end
gnome_devel_whitelist
=
%w[
gtk-doc 1.25
libart 2.3.21
pygtkglext 1.1.0
]
.
each_slice
(
2
).
to_a
.
map
do
|
formula
,
version
|
[
formula
,
version
.
split
(
"."
)[
0
..
1
].
join
(
"."
)]
end
stable
=
formula
.
stable
case
stable
&&
stable
.
url
when
/[\d\._-](alpha|beta|rc\d)/
problem
"Stable version URLs should not contain
#{
$1
}
"
matched
=
$1
version_prefix
=
stable
.
version
.
to_s
.
sub
(
/\d+$/
,
""
)
return
if
unstable_whitelist
.
include?
([
formula
.
name
,
version_prefix
])
problem
"Stable version URLs should not contain
#{
matched
}
"
when
%r{download
\.
gnome
\.
org/sources}
,
%r{ftp
\.
gnome
\.
org/pub/GNOME/sources}i
version_prefix
=
stable
.
version
.
to_s
.
split
(
"."
)[
0
..
1
].
join
(
"."
)
return
if
gnome_devel_whitelist
.
include?
([
formula
.
name
,
version_prefix
])
version
=
Version
.
parse
(
stable
.
url
)
if
version
>=
Version
.
create
(
"1.0"
)
minor_version
=
version
.
to_s
.
split
(
"."
,
3
)[
1
].
to_i
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment