<# FPS:Containers:Make:SN-Initialize-Make-Locations:ACTIVE #>

 

<#

.DESCRIPTION

Module: Make

Core Snippet: SN-Initialize-Make-Locations

 

Initializes the calling Script, Encapsulation, etc. module Locations

 

.EXAMPLE

 

$override = 'CICD'

. (Get-ActiveFileNm -PS1 Initialize-Make-Locations)

 

.CC

 

[2025.03.16 JD] Added Reconcile variables

[2024.12.12 JD] Now prepare the Sync-FPS log directory if it doesnt exist

[2024.11.06 JD] Integrated ConvertTo-DotFill for use with the Show shortcut

[2024.11.05 JD] Integrated $showBuff for use with the Show shortcut

[2024.10.11 JD] Cleaned up the CICD entries to reflect the current state of Media. Public_html is stubbed in now.

[2024.10.10 JD] Added Push-Consolidation

[2024.09.29 JD] Removed hooked int testing attributes.  Use shortcut Show to retrieve values.

[2024.09.25 JD] Original code release with CICD and Sync-FPS Locations.

 

.NOTES

 

To test the locations configured

 

Show -Make

 

#>

 

if ($overrideSrc -gt "") {

    $makCallingCode = $overrideSrc

} else {

    $makCallingCode = $PSCmdlet.MyInvocation.MyCommand.Name

}

 

# Some overrides will use the full filename, but for shortcuts we only want the shortcut name

if ($makCallingCode -like 'SC-*') { $makCallingCode = $makCallingCode.replace('SC-','') }

 

$makLoc_Logs = $global:pro_CIBase.RuntimeLogs+"\Make\$YYYY-$makCallingCode\$MM"

$makLoc_Logs += '\'+$DD+'-Log.txt'

 

$showBuff += (ConvertTo-DotFill $global:ShowDotLen ($makCallingCode+' Logs: $makLoc_Logs'))+$makLoc_Logs+'|'

 

switch ($makCallingCode) {

 

    # Shortcuts - Use only the shortcut name

    'Reconcile'        {   # Review Make:SC-Show when changes are made

                            $makLoc_ReconcileTransitional = $global:pro_CI.SourceDrive+"\00-info-transitional\fileCabinet"

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('Reconcile: $makLoc_ReconcileTransitional'))+$makLoc_ReconcileTransitional+'|'

                           

                            $makLoc_ReconcileCurrent = Mount-Path ($global:pro_CI.RuntimeDrive+"\00-info-current\fileCabinet")

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('Reconcile: $makLoc_ReconcileCurrent'))+$makLoc_ReconcileCurrent+'|'    

 

                            $makLoc_ReconcileCurrentCI = 'DESKTOP-A9GTPL1'

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('Reconcile: $makLoc_ReconcileCurrentCI'))+$makLoc_ReconcileCurrentCI+'|'    

 

                            # Prepare the directory

                            $Sink = Mount-Path ($global:pro_CIBase.RuntimeLogs+"\Make\$YYYY-Sync-FileCabinet\$MM")

                        }

 

    'CICD'              {   # Review Make:SC-Show when changes are made

                            $makLoc_CICDSourceContainers = $global:pro_CI.SourceDrive+"\FPS\Containers"

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('CICD: $makLoc_CICDSourceContainers'))+$makLoc_CICDSourceContainers+'|'

                           

                            $makLoc_CICDTargetContainers = Mount-Path ($global:pro_CI.RuntimeDrive+"\FPS\Containers")

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('CICD: $makLoc_CICDTargetContainers'))+$makLoc_CICDTargetContainers+'|'    

 

                            $makLoc_CICDSourceMetadata = $global:pro_CI.SourceDrive+"\FPS\Metadata"

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('CICD: $makLoc_CICDSourceMetadata'))+$makLoc_CICDSourceMetadata+'|'         

                           

                            $makLoc_CICDTargetMetadata = Mount-Path ($global:pro_CI.RuntimeDrive+"\FPS\Metadata")

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('CICD: $makLoc_CICDTargetMetadata'))+$makLoc_CICDTargetMetadata+'|'         

                           

                            $makLoc_CICDSourceMedia = $global:pro_CI.SourceDrive+"\FPS\Media"

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('CICD: $makLoc_CICDSourceMedia'))+$makLoc_CICDSourceMedia+'|'         

 

                            $makLoc_CICDSourceWebLocal = $makLoc_CICDSourceMedia+"\Web"

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('CICD: $makLoc_CICDSourceWebLocal'))+$makLoc_CICDSourceWebLocal+'|'         

                           

                            $makLoc_CICDTargetWebLocal = Mount-Path ($global:pro_CIBase.RuntimeMedia+"\Web")

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('CICD: $makLoc_CICDTargetWebLocal'))+$makLoc_CICDTargetWebLocal+'|'         

 

                            $makLoc_CICDTargetWebAdmSrc = Mount-Path ($global:pro_CIBase.RuntimeMedia+"\Web\Admin\Views\Pages\src")

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('CICD: $makLoc_CICDTargetWebLocal'))+$makLoc_CICDTargetWebLocal+'|'         

 

 

                            $makLoc_CICDSourcePublicHTML = $makLoc_CICDSourceMedia+"\public_html"

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('CICD: $makLoc_CICDSourcePublicHTML'))+$makLoc_CICDSourcePublicHTML+'|'         

                           

                            $makLoc_CICDTargetPublicHTML = Mount-Path ($global:pro_CIBase.RuntimeMedia+"\public_html")

                            $showBuff += (ConvertTo-DotFill $global:ShowDotLen ('CICD: $makLoc_CICDTargetPublicHTML'))+$makLoc_CICDTargetPublicHTML+'|'         

 

                            # Prepare the directory

                            $Sink = Mount-Path ($global:pro_CIBase.RuntimeLogs+"\Make\$YYYY-Sync-FPS\$MM")

                        }

    # Snippets

 

    # CmdLets

 

    default { if ($makPrintValue -gt "") { Write-Host "$makCallingCode is not a configured option" } }

}