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

Update source of gimme #2051

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/travis/build/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def sc_data
gimme: {
url: ENV.fetch(
'TRAVIS_BUILD_GIMME_URL',
'https://raw.githubusercontent.com/travis-ci/gimme/v1.5.3/gimme'
'https://raw.githubusercontent.com/urfave/gimme/v1.7.0/gimme'
)
},
go_version: ENV.fetch('TRAVIS_BUILD_GO_VERSION', '1.11.x'),
Expand Down
4 changes: 2 additions & 2 deletions lib/travis/build/rake_tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ def file_update_casher
end

def file_update_gimme
latest_release = latest_release_for('travis-ci/gimme')
latest_release = latest_release_for('urfave/gimme')
logger.info "Latest gimme release is #{latest_release}"
fetch_githubusercontent_file "travis-ci/gimme/#{latest_release}/gimme"
fetch_githubusercontent_file "urfave/gimme/#{latest_release}/gimme"
end

def file_update_godep_for_darwin
Expand Down
2 changes: 1 addition & 1 deletion lib/travis/build/script/go.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def cache_slug

private def gimme_url
cleaned = URI.parse(gimme_config[:url]).to_s.output_safe
return cleaned if cleaned =~ %r{^https://raw\.githubusercontent\.com/travis-ci/gimme}
return cleaned if cleaned =~ %r{^https://raw\.githubusercontent\.com/urfave/gimme}
DEFAULTS[:gimme_config][:url]
rescue URI::InvalidURIError => e
warn e
Expand Down
6 changes: 3 additions & 3 deletions spec/build/bash/travis_prepare_go_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@
expect(result[:out].read).to include('no ~/.gvm yay')
end

context 'when gimme>=1.5.3 is already installed' do
context 'when gimme>=1.7.0 is already installed' do
it 'bootstraps the default go and warms the known version cache' do
result = run_script(
'travis_prepare_go',
<<~BASH
#{script_header}
GIMME_VERSION=v1.5.3
GIMME_VERSION=v1.7.0
apk add --no-cache curl grep

travis_prepare_go "${GIMME_URL}" "1.7.6"
Expand All @@ -93,7 +93,7 @@
end
end

context 'when gimme<1.5.3 is already installed' do
context 'when gimme<1.7.0 is already installed' do
it 'updates gimme, bootstraps the default go, and warms the known version cache' do
result = run_script(
'travis_prepare_go',
Expand Down
6 changes: 3 additions & 3 deletions spec/build/rake_tasks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def releases_response(*versions)
creationix/nvm
tmate-io/tmate
tools/godep
travis-ci/gimme
urfave/gimme
].each do |repo_slug|
stub.get("/repos/#{repo_slug}/releases") do |*|
releases_response('v1.2.3', 'v1.2.5')
Expand All @@ -52,14 +52,14 @@ def releases_response(*versions)
/sc-linux.tar.gz
/sc-osx.zip
/travis-ci/casher/bash/bin/casher
/travis-ci/gimme/v1.2.5/gimme
/urfave/gimme/v1.2.5/gimme
].each do |filepath|
stub.get(filepath) do |*|
[200, { 'Content-Type' => 'application/octet-stream' }, "\xa1"]
end
end

stub.get('/travis-ci/gimme/master/.testdata/sample-binary-linux') do |*|
stub.get('/urfave/gimme/main/.testdata/sample-versions.txt') do |*|
[
200,
{ 'Content-Type' => 'text/plain' },
Expand Down