Update the TGUI conflict merge resolution to properly commit rebuilt bundles (#25246)

* update the tgui conflict merge process

* tidy this
This commit is contained in:
S34N
2024-04-30 11:45:41 +00:00
committed by GitHub
parent 94b5d22034
commit 773ee4afed
2 changed files with 13 additions and 10 deletions
+12 -9
View File
@@ -125,28 +125,31 @@ task-install-git-hooks() {
git_root="$(git rev-parse --show-toplevel)"
git_base_dir="${base_dir/${git_root}/.}"
git config --replace-all merge.tgui-merge-bundle.driver \
"${git_base_dir}/bin/tgui --merge=bundle %P %O %A %B %L"
"${git_base_dir}/bin/tgui --merge=bundle %P %A"
echo "tgui: Merge drivers have been successfully installed!"
}
## Bundle merge driver
task-merge-bundle() {
local file_path="${1}"
local file_ancestor="${2}"
local file_current="${3}"
local file_other="${4}"
local conflict_marker_size="${5}"
local file_current="${2}"
echo "----------------------"
echo "tgui: prepping to replace a conflicted bundle"
cat $file_path > $file_current
task-rebuild-conflicted-bundle &
exit 0
}
task-rebuild-conflicted-bundle() {
echo "----------------------"
echo "tgui: rebuilding a conflicted tgui bundle, ${file_path}"
task-install
task-webpack --mode=production
echo "tgui: replacing conflicted bundle with newly compiled bundle"
cd ../
cat $file_path > $file_current
echo "tgui: committing new bundle"
git commit -am "TGUI Bundle Rebuild"
exit 0
}
## Main
## --------------------------------------------------------
+1 -1
View File
@@ -107,7 +107,7 @@ function task-validate-build {
## Installs merge drivers and git hooks
function task-install-git-hooks () {
Set-Location $global:basedir
git config --replace-all merge.tgui-merge-bundle.driver "tgui/bin/tgui --merge=bundle %P %O %A %B %L"
git config --replace-all merge.tgui-merge-bundle.driver "tgui/bin/tgui --merge=bundle %P %A"
Write-Output "tgui: Merge drivers have been successfully installed!"
}