Skip to content

Commit

Permalink
preparation for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Ing-Dom committed Jan 24, 2024
1 parent 15ea067 commit e3fa389
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
Binary file modified dependencies.txt
Binary file not shown.
22 changes: 17 additions & 5 deletions restore/Restore-Dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ param(
# Check for privileges (Windows only)
[switch]$CheckForDeveloperMode= $true, # Default is $true
[switch]$CheckForSymbolicLinkPermissions= $true, # Default is $true
[switch]$CheckForAdminOnly= $false # Default is $false
[switch]$CheckForAdminOnly= $false, # Default is $false

# Set the Write-Host message behavior
[switch]$Verbose= $false, # Default is $false
[switch]$DebugMsg= $false # Default is $false
)

# Global Variables
Expand All @@ -63,9 +67,7 @@ $Auto_Use_mklink_To_Create_SymLinks = $false # Default is $false
# Ignore the permissions to create symbolic links with 'New-Item' and use mklink to create symbolic links.
$Force_Use_mklink_To_Create_SymLinks = $true # Default is $true. If $Auto_Use_mklink_To_Create_SymLinks is $true, this variable is ignored.

# Set the Write-Host message behavior
[switch]$Verbose= $false # Default is $false
[switch]$DebugMsg= $false # Default is $false


function Test-Administrator {
return (([Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole('Administrators')).If($true, $false)
Expand Down Expand Up @@ -239,7 +241,17 @@ function ProcessDependencies($DependenciesFile) {
# Extract the project name from the URL
$urlParts = $url -split '/'
$projectNameWithExtension = $urlParts[-1]
$projectName = $projectNameWithExtension -split '\.' | Select-Object -First 1
# Assuming the project name is the same as the repository name, and considering the possibility of a .git extension to fix a 'dot' in the project name.
# Get the index of the last dot in the string (.git)
$lastDotPosition = $projectNameWithExtension.LastIndexOf('.')
# Check if a dot was found
if ($lastDotPosition -ge 0) {
# Extract the substring without the last dot
$projectName = $projectNameWithExtension.Substring(0, $lastDotPosition)
} else {
# No dot found, use the entire string as the project name!
$projectName = $projectNameWithExtension
}
# Create a custom object for the project
[PSCustomObject]@{
"Hash" = $hash
Expand Down

0 comments on commit e3fa389

Please sign in to comment.