Skip to content

Commit

Permalink
Update shell script.
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalkhode1 committed Nov 29, 2024
1 parent 88eb613 commit 4b99534
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/deployment.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,23 @@ jobs:
"config": {
"allow-plugins": (.[0].config."allow-plugins" + .[1].config."allow-plugins")
},
"extra": (.[0].extra + .[1].extra),
"extra": (
(.[0].extra + .[1].extra) |
if .["drupal-scaffold"]? and .["drupal-scaffold"]["file-mapping"]? then
.["drupal-scaffold"]["file-mapping"] |= (
to_entries |
map(
if (.value | type == "string" and .value | test("^(\\./|[^/])")) then
.value = (env.GITHUB_WORKSPACE + "/" + .value | gsub("\\./"; "") | gsub("//"; "/"))
else
.
end
) | from_entries
)
else
.
end
),
"repositories": (
(.[0].repositories + .[1].repositories) |
map(
Expand All @@ -81,8 +97,6 @@ jobs:
)
}' composer.json ${GITHUB_WORKSPACE}/composer.json > temp_composer.json
jq '.extra."drupal-scaffold"."file-mapping" = {}' temp_composer.json > temp_composer.json
# Replace the original composer.json with the merged file.
mv temp_composer.json composer.json
Expand Down

0 comments on commit 4b99534

Please sign in to comment.