From ade4ef0661bcb594c83e260282e8f20a9d57bf57 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 15 Oct 2022 02:11:47 +0330 Subject: [PATCH 1/8] add verbose message for flattening function --- scripts/utils.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index 14f9b9f5e..f0156f8d8 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -48,6 +48,7 @@ function Create-Archive($source, $target, $params) { # If directory contains only one child directory # Flatten it instead function Flatten-Directory($name) { + Write-Verbose "Flattening the '$name' directory..." $name = Resolve-Path $name $moving = "$($name)_moving" Rename-Item $name -NewName $moving From 75ebf405cc3d950c414bb8920f3e89a2b42a5c05 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 15 Oct 2022 02:16:00 +0330 Subject: [PATCH 2/8] re-order the verbose message --- scripts/utils.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index f0156f8d8..53a2c3aea 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -48,9 +48,9 @@ function Create-Archive($source, $target, $params) { # If directory contains only one child directory # Flatten it instead function Flatten-Directory($name) { - Write-Verbose "Flattening the '$name' directory..." $name = Resolve-Path $name $moving = "$($name)_moving" + Write-Verbose "Flattening the '$name' directory..." Rename-Item $name -NewName $moving $child = Resolve-Path (Get-Childitem $moving)[0] Write-Verbose "Moving the '$child' directory to '$name'" From 51e69c0f7acdd03f0c7bed574b6c9405e050f4ce Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 15 Oct 2022 02:24:23 +0330 Subject: [PATCH 3/8] add commands for testing --- scripts/utils.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index 53a2c3aea..39497dd5e 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -52,7 +52,9 @@ function Flatten-Directory($name) { $moving = "$($name)_moving" Write-Verbose "Flattening the '$name' directory..." Rename-Item $name -NewName $moving - $child = Resolve-Path (Get-Childitem $moving)[0] + Write-Verbose "$name moved to $moving" + Get-Childitem $moving + $child = Resolve-Path ((Get-Childitem $moving)[0]) Write-Verbose "Moving the '$child' directory to '$name'" Move-Item -Path $child -Destination $name Remove-Item -Recurse $moving From 0ba734c3924bcb6a129bbe93580bcf5d8f98e928 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 15 Oct 2022 02:34:46 +0330 Subject: [PATCH 4/8] fix selecting the fullname of child item object --- scripts/utils.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index 39497dd5e..77d77b531 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -52,9 +52,7 @@ function Flatten-Directory($name) { $moving = "$($name)_moving" Write-Verbose "Flattening the '$name' directory..." Rename-Item $name -NewName $moving - Write-Verbose "$name moved to $moving" - Get-Childitem $moving - $child = Resolve-Path ((Get-Childitem $moving)[0]) + $child = (Get-Childitem $moving)[0] | Select-Object FullName | Resolve-Path Write-Verbose "Moving the '$child' directory to '$name'" Move-Item -Path $child -Destination $name Remove-Item -Recurse $moving From 403ca33b78d0fed624ee4c54118de9914b20ecef Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 15 Oct 2022 02:36:20 +0330 Subject: [PATCH 5/8] remove non-required itemgroup --- launcher/CmderLauncher.vcxproj | 5 ----- 1 file changed, 5 deletions(-) diff --git a/launcher/CmderLauncher.vcxproj b/launcher/CmderLauncher.vcxproj index 7c647e0b7..ad94c45dd 100644 --- a/launcher/CmderLauncher.vcxproj +++ b/launcher/CmderLauncher.vcxproj @@ -177,11 +177,6 @@ copy $(TargetPath) $(SolutionDir)..\$(TargetFileName) - - - RC - - RC From 7773ddbb41c66759637818f12f751d0cce932d78 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 15 Oct 2022 02:39:18 +0330 Subject: [PATCH 6/8] fix resolve path for child item --- scripts/utils.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index 77d77b531..ae69e1e76 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -52,7 +52,7 @@ function Flatten-Directory($name) { $moving = "$($name)_moving" Write-Verbose "Flattening the '$name' directory..." Rename-Item $name -NewName $moving - $child = (Get-Childitem $moving)[0] | Select-Object FullName | Resolve-Path + $child = (Get-Childitem $moving)[0] | Resolve-Path Write-Verbose "Moving the '$child' directory to '$name'" Move-Item -Path $child -Destination $name Remove-Item -Recurse $moving From 9908e6394648761e1c8aaa23eca02f67aad14b82 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 15 Oct 2022 02:44:26 +0330 Subject: [PATCH 7/8] remove un-required verbose message --- scripts/utils.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/utils.ps1 b/scripts/utils.ps1 index ae69e1e76..e72e006e3 100644 --- a/scripts/utils.ps1 +++ b/scripts/utils.ps1 @@ -50,10 +50,9 @@ function Create-Archive($source, $target, $params) { function Flatten-Directory($name) { $name = Resolve-Path $name $moving = "$($name)_moving" - Write-Verbose "Flattening the '$name' directory..." Rename-Item $name -NewName $moving + Write-Verbose "Flattening the '$name' directory..." $child = (Get-Childitem $moving)[0] | Resolve-Path - Write-Verbose "Moving the '$child' directory to '$name'" Move-Item -Path $child -Destination $name Remove-Item -Recurse $moving } From d50c583a8e7beb8c2e1d9f9a253abf64c2e57d5d Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sat, 15 Oct 2022 02:52:04 +0330 Subject: [PATCH 8/8] add cmder root prefix to exclude paramters --- scripts/pack.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pack.ps1 b/scripts/pack.ps1 index f65167f96..64b1d17a4 100644 --- a/scripts/pack.ps1 +++ b/scripts/pack.ps1 @@ -44,7 +44,7 @@ Ensure-Executable "7z" $targets = @{ "cmder.zip" = $null; "cmder.7z" = $null; - "cmder_mini.zip" = "-x!`"vendor\git-for-windows`""; + "cmder_mini.zip" = "-x!`"$cmderRoot\vendor\git-for-windows`""; } Delete-Existing "$cmderRoot\Version*"