Compare commits

..

3 Commits

Author SHA1 Message Date
Anthony Stirling
8e95254957 Update build.gradle 2025-02-04 13:22:21 +00:00
Anthony Stirling
6473748006 Update OCRController.java 2025-02-04 13:21:13 +00:00
Anthony Stirling
e3e8cd7195 Update ConvertHtmlToPDF.java 2025-02-04 13:18:45 +00:00
6 changed files with 108 additions and 95 deletions

View File

@@ -141,4 +141,4 @@ jobs:
run: | run: |
chmod +x ./testing/test_webpages.sh chmod +x ./testing/test_webpages.sh
chmod +x ./testing/test.sh chmod +x ./testing/test.sh
./testing/test.sh ./testing/test.sh "${{ github.event.pull_request.user.login == 'dependabot[bot]' }}"

View File

@@ -31,6 +31,20 @@ jobs:
java-version: '17' java-version: '17'
distribution: 'temurin' distribution: 'temurin'
- name: Cache SonarCloud packages
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Build and analyze with Gradle - name: Build and analyze with Gradle
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -111,11 +111,11 @@ jobs:
author: ${{ needs.read_bot_entries.outputs.committer }} author: ${{ needs.read_bot_entries.outputs.committer }}
signoff: true signoff: true
branch: sync_readme branch: sync_readme
title: ":globe_with_meridians: Sync Translations + Update README Progress Table" title: ":globe_with_meridians: Sync Translations + Update README Progress Table + Update Verification Metadata"
body: | body: |
### Description of Changes ### Description of Changes
This Pull Request was automatically generated to synchronize updates to translation files and documentation. Below are the details of the changes made: This Pull Request was automatically generated to synchronize updates to translation files, verification metadata, and documentation. Below are the details of the changes made:
#### **1. Synchronization of Translation Files** #### **1. Synchronization of Translation Files**
- Updated translation files (`messages_*.properties`) to reflect changes in the reference file `messages_en_GB.properties`. - Updated translation files (`messages_*.properties`) to reflect changes in the reference file `messages_en_GB.properties`.

View File

@@ -8,7 +8,7 @@ plugins {
id "com.diffplug.spotless" version "7.0.2" id "com.diffplug.spotless" version "7.0.2"
id "com.github.jk1.dependency-license-report" version "2.9" id "com.github.jk1.dependency-license-report" version "2.9"
//id "nebula.lint" version "19.0.3" //id "nebula.lint" version "19.0.3"
id("org.panteleyev.jpackageplugin") version "1.6.1" id("org.panteleyev.jpackageplugin") version "1.6.0"
id "org.sonarqube" version "6.0.1.5171" id "org.sonarqube" version "6.0.1.5171"
} }

View File

@@ -218,9 +218,6 @@ public class ProcessExecutor {
errorReaderThread.join(); errorReaderThread.join();
outputReaderThread.join(); outputReaderThread.join();
boolean isQpdf =
command != null && !command.isEmpty() && command.get(0).contains("qpdf");
if (outputLines.size() > 0) { if (outputLines.size() > 0) {
String outputMessage = String.join("\n", outputLines); String outputMessage = String.join("\n", outputLines);
messages += outputMessage; messages += outputMessage;
@@ -236,9 +233,6 @@ public class ProcessExecutor {
log.warn("Command error output:\n" + errorMessage); log.warn("Command error output:\n" + errorMessage);
} }
if (exitCode != 0) { if (exitCode != 0) {
if (isQpdf && exitCode == 3) {
log.warn("qpdf succeeded with warnings: {}", messages);
} else {
throw new IOException( throw new IOException(
"Command process failed with exit code " "Command process failed with exit code "
+ exitCode + exitCode
@@ -246,19 +240,14 @@ public class ProcessExecutor {
+ errorMessage); + errorMessage);
} }
} }
}
if (exitCode != 0) { if (exitCode != 0) {
if (isQpdf && exitCode == 3) {
log.warn("qpdf succeeded with warnings: {}", messages);
} else {
throw new IOException( throw new IOException(
"Command process failed with exit code " "Command process failed with exit code "
+ exitCode + exitCode
+ "\nLogs: " + "\nLogs: "
+ messages); + messages);
} }
}
} finally { } finally {
semaphore.release(); semaphore.release();
} }

View File

@@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
# Default value for the Boolean parameter
VERIFICATION=${1:-false} # Default is "false" if no parameter is passed
# Find project root by locating build.gradle # Find project root by locating build.gradle
find_root() { find_root() {
local dir="$PWD" local dir="$PWD"
@@ -89,6 +92,7 @@ main() {
exit 1 exit 1
fi fi
# Building Docker images # Building Docker images
# docker build --no-cache --pull --build-arg VERSION_TAG=alpha -t stirlingtools/stirling-pdf:latest -f ./Dockerfile . # docker build --no-cache --pull --build-arg VERSION_TAG=alpha -t stirlingtools/stirling-pdf:latest -f ./Dockerfile .
docker build --no-cache --pull --build-arg VERSION_TAG=alpha -t stirlingtools/stirling-pdf:latest-ultra-lite -f ./Dockerfile.ultra-lite . docker build --no-cache --pull --build-arg VERSION_TAG=alpha -t stirlingtools/stirling-pdf:latest-ultra-lite -f ./Dockerfile.ultra-lite .
@@ -107,6 +111,7 @@ main() {
cd "$PROJECT_ROOT" cd "$PROJECT_ROOT"
docker-compose -f "./exampleYmlFiles/docker-compose-latest-ultra-lite.yml" down docker-compose -f "./exampleYmlFiles/docker-compose-latest-ultra-lite.yml" down
#run_tests "Stirling-PDF" "./exampleYmlFiles/docker-compose-latest.yml" #run_tests "Stirling-PDF" "./exampleYmlFiles/docker-compose-latest.yml"
#docker-compose -f "./exampleYmlFiles/docker-compose-latest.yml" down #docker-compose -f "./exampleYmlFiles/docker-compose-latest.yml" down
@@ -117,6 +122,7 @@ main() {
exit 1 exit 1
fi fi
# Building Docker images with security enabled # Building Docker images with security enabled
# docker build --no-cache --pull --build-arg VERSION_TAG=alpha -t stirlingtools/stirling-pdf:latest -f ./Dockerfile . # docker build --no-cache --pull --build-arg VERSION_TAG=alpha -t stirlingtools/stirling-pdf:latest -f ./Dockerfile .
# docker build --no-cache --pull --build-arg VERSION_TAG=alpha -t stirlingtools/stirling-pdf:latest-ultra-lite -f ./Dockerfile.ultra-lite . # docker build --no-cache --pull --build-arg VERSION_TAG=alpha -t stirlingtools/stirling-pdf:latest-ultra-lite -f ./Dockerfile.ultra-lite .
@@ -144,6 +150,7 @@ main() {
docker-compose -f "./exampleYmlFiles/docker-compose-latest-fat-security.yml" down docker-compose -f "./exampleYmlFiles/docker-compose-latest-fat-security.yml" down
run_tests "Stirling-PDF-Security-Fat-with-login" "./exampleYmlFiles/test_cicd.yml" run_tests "Stirling-PDF-Security-Fat-with-login" "./exampleYmlFiles/test_cicd.yml"
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
@@ -179,6 +186,8 @@ main() {
echo -e "\e[31m$test\e[0m" # Red color for failed tests echo -e "\e[31m$test\e[0m" # Red color for failed tests
done done
# Check if there are any failed tests and exit with an error code if so # Check if there are any failed tests and exit with an error code if so
if [ ${#failed_tests[@]} -ne 0 ]; then if [ ${#failed_tests[@]} -ne 0 ]; then
echo "Some tests failed." echo "Some tests failed."
@@ -187,6 +196,7 @@ main() {
echo "All tests passed successfully." echo "All tests passed successfully."
exit 0 exit 0
fi fi
} }
main main