From cb1a022cdc1e38e8a7fe11201f8509c95cf86e51 Mon Sep 17 00:00:00 2001 From: kochetkov-ma Date: Mon, 1 Jun 2020 19:13:59 +0300 Subject: [PATCH] fix Dockerfile and fix AboutView --- Dockerfile | 1 + src/main/java/ru/iopump/qa/allure/gui/view/AboutView.java | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8b22ab8..401b106 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM gradle:jdk11 as build COPY . . +ENV RELEASE_VERSION=${RELEASE_VERSION:-0.0.0} RUN gradle -Pversion=docker --no-daemon -PnodeVersion=12.16.3 vaadinPrepareNode bootJar FROM openjdk:11-jre-slim as production diff --git a/src/main/java/ru/iopump/qa/allure/gui/view/AboutView.java b/src/main/java/ru/iopump/qa/allure/gui/view/AboutView.java index 36b8e3c..e2ffc05 100644 --- a/src/main/java/ru/iopump/qa/allure/gui/view/AboutView.java +++ b/src/main/java/ru/iopump/qa/allure/gui/view/AboutView.java @@ -9,7 +9,6 @@ import com.vaadin.flow.component.html.Paragraph; import com.vaadin.flow.component.orderedlayout.VerticalLayout; import com.vaadin.flow.router.PageTitle; import com.vaadin.flow.router.Route; -import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import lombok.NonNull; @@ -52,9 +51,9 @@ public class AboutView extends VerticalLayout { public static String getVersionOrDefault(@NonNull String defaultVersion) { try (final InputStream inputStream = ResourceUtil.getResourceAsStream("version.info")) { var version = IOUtils.toString(inputStream, StandardCharsets.UTF_8); - log.info("App version from version.info = " + version); + log.info("App version from version.info = " + version); //NOPMD return StringUtils.isBlank(version) ? defaultVersion : version; - } catch (IOException e) { + } catch (Exception e) { //NOPMD log.error("Version error", e); return defaultVersion; }