Skip to content

Commit b2c5177

Browse files
Merge branch 'master' into me-upgrade-sonarscanner
2 parents e29d8e8 + 0b34177 commit b2c5177

38 files changed

+1022
-67
lines changed

lib/travis/build.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,15 @@ def config
1616
module_function :config
1717

1818
def top
19-
@top ||= Pathname.new(
20-
`git rev-parse --show-toplevel 2>/dev/null`.strip
21-
)
19+
::Travis::Vcs::Git::top
2220
end
2321

2422
module_function :top
2523

2624
class << self
2725
def version
2826
return @version if @version
29-
@version ||= `git describe --always --dirty --tags 2>/dev/null`.strip
27+
@version ||= ::Travis::Vcs::Git::version
3028
@version = nil unless $?.success?
3129
@version ||= ENV.fetch('BUILD_SLUG_COMMIT', nil)
3230
@version ||= top.join('VERSION').read if top.join('VERSION').exist?

lib/travis/build/addons/artifacts/env.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
require 'core_ext/hash/deep_symbolize_keys'
22
require 'active_support/core_ext/hash/slice'
3+
require 'travis/vcs.rb'
34

45
module Travis
56
module Build
67
class Addons
78
class Artifacts < Base
89
class Env
910
DEFAULT = {
10-
paths: '$(git ls-files -o | tr "\n" ":")',
11+
paths: ::Travis::Vcs::paths,
1112
log_format: 'multiline'
1213
}
1314

lib/travis/build/addons/chrome.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ def export_source_url
6060
sh.elif "$(uname) = 'Darwin'" do
6161
case version
6262
when 'stable'
63-
pkg_url = "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"
63+
pkg_url = "https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg"
6464
when 'beta'
65-
pkg_url = "https://dl.google.com/chrome/mac/beta/googlechrome.dmg"
65+
pkg_url = "https://dl.google.com/chrome/mac/universal/beta/googlechromebeta.dmg "
6666
end
6767
sh.export 'CHROME_SOURCE_URL', pkg_url
6868
end

lib/travis/build/addons/deploy/script.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ def build_gem_locally_from(source, branch)
267267
sh.echo "Building dpl gem locally with source #{source} and branch #{branch}", ansi: :yellow
268268
cmd("gem uninstall -aIx dpl >& /dev/null", echo: false, assert: !allow_failure, timing: false)
269269
sh.cmd("pushd /tmp >& /dev/null", echo: false, assert: !allow_failure, timing: true)
270-
sh.cmd("git clone https://github.com/#{source} #{source}", echo: true, assert: !allow_failure, timing: true)
270+
sh.cmd(::Travis::Vcs::Git::clone_cmd('https://github.com',source), echo: true, assert: !allow_failure, timing: true)
271271
sh.cmd("pushd #{source} >& /dev/null", echo: false, assert: !allow_failure, timing: true)
272-
sh.cmd("git checkout #{branch}", echo: true, assert: !allow_failure, timing: true)
273-
sh.cmd("git rev-parse HEAD", echo: true, assert: !allow_failure, timing: true)
272+
sh.cmd(::Travis::Vcs::Git::checkout_cmd(branch), echo: true, assert: !allow_failure, timing: true)
273+
sh.cmd(::Travis::Vcs::Git::revision_cmd, echo: true, assert: !allow_failure, timing: true)
274274
cmd("gem build dpl.gemspec", echo: true, assert: !allow_failure, timing: true)
275275
sh.raw "for f in dpl-*.gemspec; do"
276276
sh.raw " base=${f%*.gemspec}"

lib/travis/build/appliances/agent.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
require 'base64'
22
require 'travis/build/appliances/base'
33
require 'travis/build/appliances/agent/jwt'
4-
require 'travis/build/git'
54

65
module Travis
76
module Build

lib/travis/build/appliances/checkout.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
require 'travis/build/appliances/base'
2-
require 'travis/build/git'
2+
require 'travis/vcs'
33

44
module Travis
55
module Build
66
module Appliances
77
class Checkout < Base
88
def apply
9-
Git.new(sh, data).checkout
9+
Travis::Vcs.checkout(sh, data)
1010
end
1111

1212
def apply?

lib/travis/build/appliances/rm_etc_boto_cfg.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
require 'travis/build/appliances/base'
2-
require 'travis/build/git'
32

43
module Travis
54
module Build

lib/travis/build/appliances/setup_filter.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
require 'travis/build/appliances/base'
2-
require 'travis/build/git'
32
require 'travis/rollout'
43

54
module Travis

lib/travis/build/bash/travis_install_jdk.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ travis_install_jdk_ext_provider() {
2727
mkdir -p ~/bin
2828
url="https://$TRAVIS_APP_HOST/files/install-jdk.sh"
2929
if ! travis_download "$url" ~/bin/install-jdk.sh; then
30-
url="https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh"
30+
url="https://raw.githubusercontent.com/sormuras/bach/releases/11/install-jdk.sh"
3131
travis_download "$url" ~/bin/install-jdk.sh || {
3232
echo "${ANSI_RED}Could not acquire install-jdk.sh. Stopping build.${ANSI_RESET}" >/dev/stderr
3333
travis_terminate 2

lib/travis/build/errors.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,11 @@ def initialize(msg = "Unable to fetch GitHub Apps Token. GitHub may be unavailab
8989
super
9090
end
9191
end
92+
93+
class UnknownServiceTypeError < StandardError
94+
def initialize(_type)
95+
super
96+
end
97+
end
9298
end
9399
end

0 commit comments

Comments
 (0)