mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2026-02-17 13:52:14 +01:00
refactor: move modules under app/ directory and update file paths (#3938)
# Description of Changes - **What was changed:** - Renamed top-level directories: `stirling-pdf` → `app/core`, `common` → `app/common`, `proprietary` → `app/proprietary`. - Updated all path references in `.gitattributes`, GitHub workflows (`.github/workflows/*`), scripts (`.github/scripts/*`), `.gitignore`, Dockerfiles, license files, and template settings to reflect the new structure. - Added a new CI job `check-generateOpenApiDocs` to generate and upload OpenAPI documentation. - Removed redundant `@Autowired` annotations from `TempFileShutdownHook` and `UnlockPDFFormsController`. - Minor formatting and comment adjustments in YAML templates and resource files. - **Why the change was made:** - To introduce a clear `app/` directory hierarchy for core, common, and proprietary modules, improving organization and maintainability. - To ensure continuous integration and Docker builds continue to work seamlessly with the reorganized structure. - To automate OpenAPI documentation generation as part of the CI pipeline. --- ## 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/devGuide/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/devGuide/HowToAddNewLanguage.md) (if applicable) - [x] 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/devGuide/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/devGuide/DeveloperGuide.md#6-testing) for more details.
This commit is contained in:
@@ -182,17 +182,17 @@ get_expected_version() {
|
||||
verify_app_version() {
|
||||
local service_name=$1
|
||||
local base_url=$2
|
||||
|
||||
|
||||
echo "Checking version for $service_name (expecting $EXPECTED_VERSION)..."
|
||||
|
||||
|
||||
# Try to access the homepage and extract the version
|
||||
local response
|
||||
response=$(curl -s "$base_url")
|
||||
|
||||
|
||||
# Extract version from pixel tracking tag
|
||||
local actual_version
|
||||
actual_version=$(echo "$response" | grep -o 'appVersion=[0-9.]*' | head -1 | sed 's/appVersion=//')
|
||||
|
||||
|
||||
# If we couldn't find the version in the pixel tag, try other approaches
|
||||
if [ -z "$actual_version" ]; then
|
||||
# Check for "App Version:" format
|
||||
@@ -203,7 +203,7 @@ verify_app_version() {
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Check if the extracted version matches expected version
|
||||
if [ "$actual_version" = "$EXPECTED_VERSION" ]; then
|
||||
echo "✅ Version verification passed: $actual_version"
|
||||
@@ -264,13 +264,13 @@ main() {
|
||||
export DOCKER_CLI_EXPERIMENTAL=enabled
|
||||
export COMPOSE_DOCKER_CLI_BUILD=0
|
||||
export DISABLE_ADDITIONAL_FEATURES=true
|
||||
|
||||
|
||||
# Run the gradlew build command and check if it fails
|
||||
if ! ./gradlew clean build; then
|
||||
echo "Gradle build failed with security disabled, exiting script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Get expected version after the build to ensure version.properties is created
|
||||
echo "Getting expected version from Gradle..."
|
||||
EXPECTED_VERSION=$(get_expected_version)
|
||||
@@ -292,7 +292,7 @@ main() {
|
||||
echo "Webpage accessibility lite tests failed"
|
||||
fi
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
|
||||
echo "Testing version verification..."
|
||||
if verify_app_version "Stirling-PDF-Ultra-Lite" "http://localhost:8080"; then
|
||||
passed_tests+=("Stirling-PDF-Ultra-Lite-Version-Check")
|
||||
@@ -301,7 +301,7 @@ main() {
|
||||
failed_tests+=("Stirling-PDF-Ultra-Lite-Version-Check")
|
||||
echo "Version verification failed for Stirling-PDF-Ultra-Lite"
|
||||
fi
|
||||
|
||||
|
||||
docker-compose -f "./exampleYmlFiles/docker-compose-latest-ultra-lite.yml" down
|
||||
|
||||
# run_tests "Stirling-PDF" "./exampleYmlFiles/docker-compose-latest.yml"
|
||||
@@ -313,7 +313,7 @@ main() {
|
||||
echo "Gradle build failed with security enabled, exiting script."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Get expected version after the security-enabled build
|
||||
echo "Getting expected version from Gradle (security enabled)..."
|
||||
EXPECTED_VERSION=$(get_expected_version)
|
||||
@@ -343,7 +343,7 @@ main() {
|
||||
echo "Webpage accessibility full tests failed"
|
||||
fi
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
|
||||
echo "Testing version verification..."
|
||||
if verify_app_version "Stirling-PDF-Security-Fat" "http://localhost:8080"; then
|
||||
passed_tests+=("Stirling-PDF-Security-Fat-Version-Check")
|
||||
@@ -420,7 +420,7 @@ main() {
|
||||
failed_tests+=("Disabled-Endpoints")
|
||||
echo "Disabled Endpoints tests failed"
|
||||
fi
|
||||
|
||||
|
||||
echo "Testing version verification..."
|
||||
if verify_app_version "Stirling-PDF-Fat-Disable-Endpoints" "http://localhost:8080"; then
|
||||
passed_tests+=("Stirling-PDF-Fat-Disable-Endpoints-Version-Check")
|
||||
|
||||
Reference in New Issue
Block a user