Skip to content

Commit

Permalink
[CHANGED] Upgrade to golang 1.14.3. Update dotnet-sdk to 3.1
Browse files Browse the repository at this point in the history
Signed-off-by: Debbie Chen <dechen@pivotal.io>
  • Loading branch information
pivotal-pmital authored and xtreme-debbie-chen committed May 28, 2020
1 parent 3d38872 commit 0969e98
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:xenial
# Versioning
ENV PIP_INSTALL_VERSION 19.0.2
ENV PIP3_INSTALL_VERSION 8.1.1
ENV GO_LANG_VERSION 1.13.3
ENV GO_LANG_VERSION 1.14.3
ENV MAVEN_VERSION 3.6.0
ENV SBT_VERSION 1.3.3
ENV GRADLE_VERSION 5.6.4
Expand Down Expand Up @@ -150,7 +150,7 @@ RUN wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsof
sudo dpkg -i packages-microsoft-prod.deb &&\
rm packages-microsoft-prod.deb &&\
sudo apt-get update &&\
sudo apt-get install -y dotnet-runtime-2.1 dotnet-sdk-2.1 dotnet-sdk-2.2 dotnet-sdk-3.0
sudo apt-get install -y dotnet-runtime-2.1 dotnet-sdk-2.1 dotnet-sdk-2.2 dotnet-sdk-3.0 dotnet-sdk-3.1

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 4F4EA0AAE5267A6C &&\
echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" | sudo tee /etc/apt/sources.list.d/php.list &&\
Expand Down
6 changes: 4 additions & 2 deletions lib/license_finder/package_managers/go_modules.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@ def current_packages
private

def packages_info
info_output, stderr, _status = Cmd.run("GO111MODULE=on go list -m -mod=vendor -f '{{.Path}},{{.Version}},{{.Dir}}' all")
info_output, _stderr, _status = Cmd.run("GO111MODULE=on go list -m -f '{{.Path}},{{.Version}},{{.Dir}}' all") if stderr =~ Regexp.compile("can't compute 'all' using the vendor directory")
info_output, stderr, _status = Cmd.run("GO111MODULE=on go list -m -f '{{.Path}},{{.Version}},{{.Dir}}' all")
if stderr =~ Regexp.compile("can't compute 'all' using the vendor directory")
info_output, _stderr, _status = Cmd.run("GO111MODULE=on go list -m -mod=mod -f '{{.Path}},{{.Version}},{{.Dir}}' all")
end

info_output.split("\n")
end
Expand Down
6 changes: 3 additions & 3 deletions spec/lib/license_finder/package_managers/go_modules_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module LicenseFinder
FileUtils.mkdir_p(vendor_path)
File.write(sum_path, content)

allow(SharedHelpers::Cmd).to receive(:run).with("GO111MODULE=on go list -m -mod=vendor -f '{{.Path}},{{.Version}},{{.Dir}}' all").and_return(go_list_string)
allow(SharedHelpers::Cmd).to receive(:run).with("GO111MODULE=on go list -m -f '{{.Path}},{{.Version}},{{.Dir}}' all").and_return(go_list_string)
end

after do
Expand Down Expand Up @@ -58,10 +58,10 @@ module LicenseFinder
context 'when compute is not allowed on vendor' do
before do
allow(SharedHelpers::Cmd).to receive(:run)
.with("GO111MODULE=on go list -m -mod=vendor -f '{{.Path}},{{.Version}},{{.Dir}}' all")
.with("GO111MODULE=on go list -m -f '{{.Path}},{{.Version}},{{.Dir}}' all")
.and_return(['', "go list -m: can't compute 'all' using the vendor directory\n\t(Use -mod=mod or -mod=readonly to bypass.)\n", 1])
allow(SharedHelpers::Cmd).to receive(:run)
.with("GO111MODULE=on go list -m -f '{{.Path}},{{.Version}},{{.Dir}}' all")
.with("GO111MODULE=on go list -m -mod=mod -f '{{.Path}},{{.Version}},{{.Dir}}' all")
.and_return(go_list_string)
end

Expand Down

0 comments on commit 0969e98

Please sign in to comment.