Skip to content

Commit 6887e15

Browse files
authored
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.
1 parent 7f8e3d6 commit 6887e15

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

Diff for: Dockerfile.fat

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ COPY build.gradle .
55
COPY settings.gradle .
66
COPY gradlew .
77
COPY gradle gradle/
8-
RUN ./gradlew build -x spotlessApply -x spotlessCheck -x test -x sonarqube || return 0
8+
RUN ./gradlew build -x spotlessApply -x spotlessCheck -x test -x sonarqube || return 0
99

1010
# Set the working directory
1111
WORKDIR /app

Diff for: build.gradle

+14-4
Original file line numberDiff line numberDiff line change
@@ -543,12 +543,22 @@ compileJava {
543543
}
544544

545545
task writeVersion {
546-
def propsFile = file("src/main/resources/version.properties")
547-
def props = new Properties()
548-
props.setProperty("version", version)
549-
props.store(propsFile.newWriter(), null)
546+
def propsFile = file("$projectDir/src/main/resources/version.properties")
547+
def propsDir = propsFile.parentFile
548+
549+
doLast {
550+
if (!propsDir.exists()) {
551+
propsDir.mkdirs()
552+
}
553+
554+
def props = new Properties()
555+
props.setProperty("version", version)
556+
props.store(propsFile.newWriter(), null)
557+
}
550558
}
551559

560+
processResources.dependsOn(writeVersion)
561+
552562
swaggerhubUpload {
553563
// dependsOn = generateOpenApiDocs // Depends on your task generating Swagger docs
554564
api = "Stirling-PDF" // The name of your API on SwaggerHub

0 commit comments

Comments
 (0)