functions/RegisterWorkspaceTags.ps1
function RegisterWorkspaceTags { foreach($wt in GetWorkspaceTagsConfig) { if ($script:debugMode) {write-host ('creating workspace ${0} to {1}' -f $wt.name, $wt.path)} New-Variable $wt.name -Value $wt.path -Scope 'global' -Force $script:tagVariables += @{name = $wt.name; path = $wt.path} } # Add relevant dirtags for each workspace. Example: $workspace1_sometag foreach($wt in GetWorkspaceDirTags) { New-Variable $wt.name -Value $wt.path -Scope 'global' -Force $script:tagVariables += @{name = $wt.name; path = $wt.path} if ($script:debugMode) {write-host ('creating workspace dirtag ${0} to {1}' -f $wt.name, $wt.path)} } } |