From 706865d65bb32d011ee81405a4e30c2c4789c19c Mon Sep 17 00:00:00 2001 From: Filipe Esperandio Date: Fri, 3 Jan 2020 18:21:33 -0300 Subject: [PATCH 1/2] Fix upgrade scripts --- Dockerfile | 8 ++++---- bin/scrape-docs | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f60302..e536cb5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:2.3.0-alpine +FROM ruby:2.6.3-alpine ENV LANG C.UTF-8 @@ -19,8 +19,8 @@ RUN { \ ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk/jre ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin -ENV JAVA_VERSION 8u92 -ENV JAVA_ALPINE_VERSION 8.92.14-r0 +ENV JAVA_VERSION 8u222 +ENV JAVA_ALPINE_VERSION 8.222.10-r0 RUN set -x \ && apk update && apk add --no-cache --update \ @@ -35,7 +35,7 @@ COPY bin/install-checkstyle.sh /usr/src/app/bin/ RUN chown -R app:app /usr/src/app RUN ./bin/install-checkstyle.sh -RUN apk add --update make g++ git && bundle install +RUN apk add --update make g++ git curl && bundle install VOLUME /code WORKDIR /code diff --git a/bin/scrape-docs b/bin/scrape-docs index b487ad1..b26170b 100755 --- a/bin/scrape-docs +++ b/bin/scrape-docs @@ -18,8 +18,7 @@ if !Dir.exists? "data/" system "git clone --shallow-since=2019-01-01 https://github.com/checkstyle/checkstyle.git data/" or raise "clone failed" end -system "cd data && git checkout master 1>/dev/null 2>/dev/null && git pull origin master 1>/dev/null 2>/dev/null" or raise "pull failed" -system "cd data && git checkout checkstyle-#{CHECKSTYLE_VERSION} 2>/dev/null" or raise "checkout failed" +system "cd data && git fetch origin && git reset --hard && git checkout checkstyle-#{CHECKSTYLE_VERSION} 2>/dev/null" or raise "checkout failed" xml_files = Dir.glob("data/src/xdocs/config_*").sort xml_data = xml_files.map{|f| Nokogiri::XML(File.read(f)) } From b88aa9c080a72b2dc52a0254e765c54083c40b6f Mon Sep 17 00:00:00 2001 From: Filipe Esperandio Date: Fri, 3 Jan 2020 18:34:52 -0300 Subject: [PATCH 2/2] Update gems --- Gemfile.lock | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index ed31d86..4bcf33a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,32 +3,28 @@ GEM specs: coderay (1.1.2) diff-lcs (1.3) - method_source (0.8.2) - mini_portile2 (2.1.0) - nokogiri (1.6.8) - mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - pkg-config (1.1.7) - posix-spawn (0.3.11) - pry (0.10.4) + method_source (0.9.2) + mini_portile2 (2.4.0) + nokogiri (1.10.7) + mini_portile2 (~> 2.4.0) + posix-spawn (0.3.13) + pry (0.12.2) coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - rake (11.2.2) - rspec (3.6.0) - rspec-core (~> 3.6.0) - rspec-expectations (~> 3.6.0) - rspec-mocks (~> 3.6.0) - rspec-core (3.6.0) - rspec-support (~> 3.6.0) - rspec-expectations (3.6.0) + method_source (~> 0.9.0) + rake (13.0.1) + rspec (3.9.0) + rspec-core (~> 3.9.0) + rspec-expectations (~> 3.9.0) + rspec-mocks (~> 3.9.0) + rspec-core (3.9.1) + rspec-support (~> 3.9.1) + rspec-expectations (3.9.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-mocks (3.6.0) + rspec-support (~> 3.9.0) + rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.6.0) - rspec-support (3.6.0) - slop (3.6.0) + rspec-support (~> 3.9.0) + rspec-support (3.9.2) PLATFORMS ruby @@ -41,4 +37,4 @@ DEPENDENCIES rspec BUNDLED WITH - 1.11.2 + 1.17.2