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
38f9a78c
Commit
38f9a78c
authored
10 years ago
by
Mike McQuaid
Browse files
Options
Downloads
Patches
Plain Diff
Add initial Bintray upload support.
parent
51956d34
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Library/Homebrew/cmd/pull.rb
+4
-0
4 additions, 0 deletions
Library/Homebrew/cmd/pull.rb
Library/Homebrew/cmd/test-bot.rb
+29
-0
29 additions, 0 deletions
Library/Homebrew/cmd/test-bot.rb
Library/Homebrew/software_spec.rb
+5
-1
5 additions, 1 deletion
Library/Homebrew/software_spec.rb
with
38 additions
and
1 deletion
Library/Homebrew/cmd/pull.rb
+
4
−
0
View file @
38f9a78c
...
@@ -152,6 +152,10 @@ module Homebrew
...
@@ -152,6 +152,10 @@ module Homebrew
safe_system
"git"
,
"checkout"
,
branch
safe_system
"git"
,
"checkout"
,
branch
safe_system
"git"
,
"merge"
,
"--ff-only"
,
"--no-edit"
,
bottle_branch
safe_system
"git"
,
"merge"
,
"--ff-only"
,
"--no-edit"
,
bottle_branch
safe_system
"git"
,
"branch"
,
"-D"
,
bottle_branch
safe_system
"git"
,
"branch"
,
"-D"
,
bottle_branch
# TODO: publish on bintray
# safe_system "curl", "-u#{user}:#{key}", "-X", "POST",
# "https://api.bintray.com/content/homebrew/#{repo}/#{formula}/#{version}"
end
end
ohai
'Patch changed:'
ohai
'Patch changed:'
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/cmd/test-bot.rb
+
29
−
0
View file @
38f9a78c
...
@@ -666,6 +666,10 @@ module Homebrew
...
@@ -666,6 +666,10 @@ module Homebrew
id
=
ENV
[
'UPSTREAM_BUILD_ID'
]
id
=
ENV
[
'UPSTREAM_BUILD_ID'
]
raise
"Missing Jenkins variables!"
unless
jenkins
and
job
and
id
raise
"Missing Jenkins variables!"
unless
jenkins
and
job
and
id
user
=
ENV
[
"BINTRAY_USER"
]
key
=
ENV
[
"BINTRAY_KEY"
]
raise
"Missing Bintray variables!"
unless
user
&&
key
ARGV
<<
'--verbose'
ARGV
<<
'--verbose'
bottles
=
Dir
[
"
#{
jenkins
}
/jobs/
#{
job
}
/configurations/axis-version/*/builds/
#{
id
}
/archive/*.bottle*.*"
]
bottles
=
Dir
[
"
#{
jenkins
}
/jobs/
#{
job
}
/configurations/axis-version/*/builds/
#{
id
}
/archive/*.bottle*.*"
]
...
@@ -706,6 +710,7 @@ module Homebrew
...
@@ -706,6 +710,7 @@ module Homebrew
tag
=
pr
?
"pr-
#{
pr
}
"
:
"testing-
#{
number
}
"
tag
=
pr
?
"pr-
#{
pr
}
"
:
"testing-
#{
number
}
"
safe_system
"git"
,
"push"
,
"--force"
,
remote
,
"master:master"
,
":refs/tags/
#{
tag
}
"
safe_system
"git"
,
"push"
,
"--force"
,
remote
,
"master:master"
,
":refs/tags/
#{
tag
}
"
# SourceForge upload (will be removed soon)
path
=
"/home/frs/project/m/ma/machomebrew/Bottles/"
path
=
"/home/frs/project/m/ma/machomebrew/Bottles/"
if
tap
if
tap
tap_user
,
tap_repo
=
tap
.
split
"/"
tap_user
,
tap_repo
=
tap
.
split
"/"
...
@@ -717,6 +722,30 @@ module Homebrew
...
@@ -717,6 +722,30 @@ module Homebrew
rsync_args
+=
Dir
[
"*.bottle*.tar.gz"
]
+
[
url
]
rsync_args
+=
Dir
[
"*.bottle*.tar.gz"
]
+
[
url
]
safe_system
"rsync"
,
*
rsync_args
safe_system
"rsync"
,
*
rsync_args
# Bintray upload (will take over soon)
repo
=
if
tap
tap
.
sub
(
"/"
,
"-"
)
+
"-bottles"
else
"bottles"
end
Dir
.
glob
(
"*.bottle*.tar.gz"
)
do
|
filename
|
# Skip taps for now until we're using Bintray for Homebrew/homebrew
next
if
tap
version
=
BottleVersion
.
parse
(
filename
).
to_s
formula
=
bottle_filename_formula_name
filename
package_url
=
"https://api.bintray.com/packages/homebrew/
#{
repo
}
/
#{
formula
}
"
unless
system
"curl"
,
"--silent"
,
"--fail"
,
"--output"
,
"/dev/null"
,
package_url
safe_system
"curl"
,
"-H"
,
"Content-Type: application/json"
,
"-d"
,
"{'name':'
#{
formula
}
','licenses':['MIT']}"
,
package_url
end
safe_system
"curl"
,
"-u
#{
user
}
:
#{
key
}
"
,
"-T"
,
filename
,
"
#{
package_url
}
/
#{
version
}
/
#{
filename
}
"
end
safe_system
"git"
,
"tag"
,
"--force"
,
tag
safe_system
"git"
,
"tag"
,
"--force"
,
tag
safe_system
"git"
,
"push"
,
"--force"
,
remote
,
"refs/tags/
#{
tag
}
"
safe_system
"git"
,
"push"
,
"--force"
,
remote
,
"refs/tags/
#{
tag
}
"
return
return
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/software_spec.rb
+
5
−
1
View file @
38f9a78c
...
@@ -251,7 +251,11 @@ end
...
@@ -251,7 +251,11 @@ end
class
BottleSpecification
class
BottleSpecification
DEFAULT_PREFIX
=
"/usr/local"
.
freeze
DEFAULT_PREFIX
=
"/usr/local"
.
freeze
DEFAULT_CELLAR
=
"/usr/local/Cellar"
.
freeze
DEFAULT_CELLAR
=
"/usr/local/Cellar"
.
freeze
DEFAULT_ROOT_URL
=
"https://downloads.sf.net/project/machomebrew/Bottles"
.
freeze
if
ENV
[
"HOMEBREW_BINTRAY_TESTING"
]
DEFAULT_ROOT_URL
=
"https://bintray.com/artifact/download/homebrew/bottles"
.
freeze
else
DEFAULT_ROOT_URL
=
"https://downloads.sf.net/project/machomebrew/Bottles"
.
freeze
end
attr_rw
:root_url
,
:prefix
,
:cellar
,
:revision
attr_rw
:root_url
,
:prefix
,
:cellar
,
:revision
attr_reader
:checksum
,
:collector
attr_reader
:checksum
,
:collector
...
...
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