Skip to content

Commit

Permalink
get-config path
Browse files Browse the repository at this point in the history
  • Loading branch information
jworkmanjc committed Oct 2, 2023
1 parent 4ee06eb commit 099ccd1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions PowerShell/Deploy/Get-Config.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ param (
[Parameter(Mandatory = $false, ValueFromPipelineByPropertyName = $true, HelpMessage = 'Deploy Folder Name')][ValidateNotNullOrEmpty()][System.String]$DeployFolder = "/Powershell/Deploy"
)
# Set variables:
$ScriptRoot = $PSScriptRoot
$FolderPath_ModuleRootPath = (Get-Item -Path:($ScriptRoot)).Parent.FullName
$ScriptRoot = $MyInvocation.MyCommand.Path
write-host $ScriptRoot
# break

$FolderPath_ModuleRootPath = (Get-Item -Path:($ScriptRoot)).Directory.parent.FullName
$GitHubWikiUrl = 'https://github.com/TheJumpCloud/support/wiki/'
$FilePath_ModuleChangelog = $FolderPath_ModuleRootPath + '/ModuleChangelog.md'
# Define required files and folders variables
Expand All @@ -27,7 +30,7 @@ $RequiredFolders | ForEach-Object {
$FolderPath = $FolderPath_Module + '/' + $FolderName
New-Variable -Name:('FolderName_' + $_.Replace('-', '')) -Value:($FolderName) -Force -Scope Global;
New-Variable -Name:('FolderPath_' + $_.Replace('-', '')) -Value:($FolderPath) -Force -Scope Global
# write-host "New Variable: $('FolderPath_' + $_) with value: $($FolderPath)"
write-host "New Variable: $('FolderPath_' + $_) with value: $($FolderPath)"
}
$RequiredFiles | ForEach-Object {
$FileName = If ($_ -in ('psm1', 'psd1')) {
Expand All @@ -38,7 +41,7 @@ $RequiredFiles | ForEach-Object {
$FilePath = $FolderPath_Module + '/' + $FileName
New-Variable -Name:('FileName_' + $_) -Value:($FileName) -Force -Scope Global;
New-Variable -Name:('FilePath_' + $_) -Value:($FilePath) -Force -Scope Global;
# write-host "New Variable: $('FilePath_' + $_) with value: $($FilePath)"
write-host "New Variable: $('FilePath_' + $_) with value: $($FilePath)"
}
# Get .psd1 contents
$Psd1 = Import-PowerShellDataFile -Path:($FilePath_psd1)
Expand Down

0 comments on commit 099ccd1

Please sign in to comment.