From 6887e156104299c1d8075cd8b033542950a99f05 Mon Sep 17 00:00:00 2001 From: Ludy Date: Wed, 9 Apr 2025 10:04:12 +0000 Subject: [PATCH] Fix: corrects the path to `version.properties` (#3290) # Description of Changes Please provide a summary of the changes, including: `/home/gradle/src/main/resources/version.properties (No such file or directory)` --- ## Checklist ### General - [x] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [x] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [x] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details. --- Dockerfile.fat | 2 +- build.gradle | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Dockerfile.fat b/Dockerfile.fat index 3dab4b33..2dbf4ba4 100644 --- a/Dockerfile.fat +++ b/Dockerfile.fat @@ -5,7 +5,7 @@ COPY build.gradle . COPY settings.gradle . COPY gradlew . COPY gradle gradle/ -RUN ./gradlew build -x spotlessApply -x spotlessCheck -x test -x sonarqube || return 0 +RUN ./gradlew build -x spotlessApply -x spotlessCheck -x test -x sonarqube || return 0 # Set the working directory WORKDIR /app diff --git a/build.gradle b/build.gradle index 9871d998..c5a721f1 100644 --- a/build.gradle +++ b/build.gradle @@ -543,12 +543,22 @@ compileJava { } task writeVersion { - def propsFile = file("src/main/resources/version.properties") - def props = new Properties() - props.setProperty("version", version) - props.store(propsFile.newWriter(), null) + def propsFile = file("$projectDir/src/main/resources/version.properties") + def propsDir = propsFile.parentFile + + doLast { + if (!propsDir.exists()) { + propsDir.mkdirs() + } + + def props = new Properties() + props.setProperty("version", version) + props.store(propsFile.newWriter(), null) + } } +processResources.dependsOn(writeVersion) + swaggerhubUpload { // dependsOn = generateOpenApiDocs // Depends on your task generating Swagger docs api = "Stirling-PDF" // The name of your API on SwaggerHub