Unused import A module is imported (using the import statement) but t… #54
@@ -32,13 +32,11 @@ USAGE: ./scripts/release/package_extension.py [output_dir] [version]
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
|
||||||
import shutil
|
|
||||||
import sys
|
import sys
|
||||||
import zipfile
|
import zipfile
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Set
|
from typing import Set
|
||||||
|
|
||||||
# Add lib directory to path
|
# Add lib directory to path
|
||||||
sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))
|
sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))
|
||||||
@@ -170,7 +168,7 @@ def create_package(
|
|||||||
# Generate ZIP filename
|
# Generate ZIP filename
|
||||||
timestamp = datetime.now().strftime("%Y%m%d-%H%M%S")
|
timestamp = datetime.now().strftime("%Y%m%d-%H%M%S")
|
||||||
platform_suffix = f"{ext_info.platform.value}-{ext_info.extension_type}"
|
platform_suffix = f"{ext_info.platform.value}-{ext_info.extension_type}"
|
||||||
zip_filename = f"{repo_name}-{version}-{platform_suffix}.zip"
|
zip_filename = f"{repo_name}-{version}-{platform_suffix}-{timestamp}.zip"
|
||||||
zip_path = output_path / zip_filename
|
zip_path = output_path / zip_filename
|
||||||
|
|
||||||
# Remove existing ZIP if present
|
# Remove existing ZIP if present
|
||||||
@@ -307,6 +305,12 @@ Supports both Joomla and Dolibarr extensions with automatic platform detection.
|
|||||||
exclude_patterns=exclude_patterns
|
exclude_patterns=exclude_patterns
|
||||||
)
|
)
|
||||||
|
|
||||||
|
result = {
|
||||||
|
"status": "success",
|
||||||
|
"zip_path": str(zip_path)
|
||||||
|
}
|
||||||
|
common.json_output(result)
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
import common
|
import common
|
||||||
import joomla_manifest
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print("ERROR: Cannot import required libraries", file=sys.stderr)
|
print("ERROR: Cannot import required libraries", file=sys.stderr)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ BRIEF: Run all validation scripts
|
|||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Tuple
|
from typing import Tuple
|
||||||
|
|
||||||
# Add lib directory to path
|
# Add lib directory to path
|
||||||
sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))
|
sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ NOTE: Checks YAML syntax, structure, and best practices
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import List, Tuple
|
|
||||||
|
|
||||||
# Add lib directory to path
|
# Add lib directory to path
|
||||||
sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))
|
sys.path.insert(0, str(Path(__file__).parent.parent / "lib"))
|
||||||
|
|||||||
@@ -90,8 +90,6 @@
|
|||||||
return scripts.reverse().find(s => (s.getAttribute("src") || "").includes("/gtm.js")) || null;
|
return scripts.reverse().find(s => (s.getAttribute("src") || "").includes("/gtm.js")) || null;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getAttr = (el, name) => el ? el.getAttribute(name) : null;
|
|
||||||
|
|
||||||
const readDatasetCascade = (name) => {
|
const readDatasetCascade = (name) => {
|
||||||
// Check <script>, <html>, <body>, then <meta name="moko:gtm-<name>">
|
// Check <script>, <html>, <body>, then <meta name="moko:gtm-<name>">
|
||||||
const script = getCurrentScript();
|
const script = getCurrentScript();
|
||||||
|
|||||||
Reference in New Issue
Block a user