Skip to content

Commit

Permalink
[BUGFIX] Handle wrong package path calculation for extension development
Browse files Browse the repository at this point in the history
Can be reverted once https://review.typo3.org/c/Packages/TYPO3.CMS/+/85212
is merged and released.
  • Loading branch information
eliashaeussler committed Jul 11, 2024
1 parent 0fec1fc commit d260e30
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions Tests/Build/Scripts/fix_invalid_package_path.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# shellcheck disable=SC2155,SC2059
set -e

readonly artifactFile=".Build/vendor/typo3/PackageArtifact.php"
readonly tempFile="$(mktemp)"

CYAN="\e[36m"
YELLOW="\e[43m"
NC="\e[0m"

printf "${YELLOW}Running script to fix invalid package path in PackageArtifact.${NC}\n"
printf "${CYAN}Please remove this script once https://review.typo3.org/c/Packages/TYPO3.CMS/+/85212 is released.${NC}\n"

awk '{ gsub(/packagePath";s:2:"\/\/"/, "packagePath\";s:0:\"\""); print }' "$artifactFile" > "$tempFile" \
&& mv "$tempFile" "$artifactFile"
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
"@composer -d Tests/CGL update"
],
"post-autoload-dump": [
"@environment:prepare"
"@environment:prepare",
"Tests/Build/Scripts/fix_invalid_package_path.sh"
],
"cgl": "@composer -d Tests/CGL --",
"docs": [
Expand Down

0 comments on commit d260e30

Please sign in to comment.