diff --git a/.github/workflows/create_version.yml b/.github/workflows/create_version.yml index 3d9137f26e..72b3ec51c1 100644 --- a/.github/workflows/create_version.yml +++ b/.github/workflows/create_version.yml @@ -52,9 +52,6 @@ jobs: run: | sed -i "s/Current Version:.*/Current Version: 3.0.0.${{ steps.current_date.outputs.date }}.${{ steps.increment_counter.outputs.counter }} (This line will be automatically updated to reflect the latest version)/" README.md - - name: Update VersionController.java - run: echo "3.0.0.${{ steps.current_date.outputs.date }}.${{ steps.increment_counter.outputs.counter }}" > src/main/java/com/divudi/bean/common/VERSION.txt - - name: Set Git user name and email run: | git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" @@ -62,7 +59,7 @@ jobs: - name: Stage changes run: | - git add VERSION.txt README.md src/main/java/com/divudi/bean/common/VERSION.txt .github/counter.txt .github/last_date.txt + git add VERSION.txt README.md .github/counter.txt .github/last_date.txt - name: Commit version and README update run: | diff --git a/src/main/java/com/divudi/bean/common/VERSION.txt b/src/main/java/com/divudi/bean/common/VERSION.txt deleted file mode 100644 index 548d30fc0e..0000000000 --- a/src/main/java/com/divudi/bean/common/VERSION.txt +++ /dev/null @@ -1 +0,0 @@ -3.0.0.20240410.6 diff --git a/src/main/java/com/divudi/bean/common/VersionController.java b/src/main/java/com/divudi/bean/common/VersionController.java index 3c6cea1ffb..06d8418043 100644 --- a/src/main/java/com/divudi/bean/common/VersionController.java +++ b/src/main/java/com/divudi/bean/common/VersionController.java @@ -30,22 +30,21 @@ public VersionController() { * Reads the first line of the text file and checks if it contains the system version. */ public void readFirstLine() { - String filePath = "../".repeat(7) + fileName; try { // Read the first line from the file - String firstLine = Files.lines(Paths.get(filePath)).findFirst().orElse(null); + String firstLine = Files.lines(Paths.get(fileName)).findFirst().orElse(null); if (firstLine != null && !firstLine.isEmpty()) { // Set systemVersion to the content of the first line systemVersion = firstLine.trim(); } else { // If the first line is empty or the file does not exist, set systemVersion to "0.0.0.0" - systemVersion = "0.0.0.0"; + systemVersion = null; } } catch (IOException e) { // Handle IOException by printing the stack trace e.printStackTrace(); // Set systemVersion to "0.0.0.0" if an IOException occurs - systemVersion = "0.0.0.0"; + systemVersion = null; } } diff --git a/src/main/webapp/resources/template/template.xhtml b/src/main/webapp/resources/template/template.xhtml index b310e8340a..df481c6a0e 100644 --- a/src/main/webapp/resources/template/template.xhtml +++ b/src/main/webapp/resources/template/template.xhtml @@ -103,7 +103,7 @@
|
-
+