-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPSDepend.psd1
More file actions
114 lines (105 loc) · 7.36 KB
/
PSDepend.psd1
File metadata and controls
114 lines (105 loc) · 7.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
@{
# ─────────────────────────────────────────────────────────────────
# Global options — these apply to every dependency unless overridden
# ─────────────────────────────────────────────────────────────────
# PSDependOptions = @{
# Target = 'CurrentUser' # 'CurrentUser', 'AllUsers', or a file path
# AddToPath = $true # Add Target to $env:PSModulePath
# DependencyType = 'PSGalleryModule' # Default type if not specified per-entry
# Tags = @('Build', 'Test') # Only process deps matching these tags
# }
# ─────────────────────────────────────────────────────────────────
# Simple format — module name = version string
# ─────────────────────────────────────────────────────────────────
# 'MyModuleName' = 'latest' # Always pull the newest version
# 'AnotherModule' = '2.4.1' # Pin to an exact version
# 'YetAnotherModule' = '1.*' # Wildcard — latest 1.x release
# ─────────────────────────────────────────────────────────────────
# Hashtable format — PSGallery module with extra options
# ─────────────────────────────────────────────────────────────────
# 'MyGalleryModule' = @{
# DependencyType = 'PSGalleryModule' # Explicit (this is also the default)
# Version = '3.0.0'
# Target = 'CurrentUser'
# Tags = @('Build')
# Parameters = @{
# SkipPublisherCheck = $true
# AllowClobber = $true
# Repository = 'PSGallery' # Use a named repo
# }
# }
# ─────────────────────────────────────────────────────────────────
# PSGallery NuGet dependency (uses NuGet directly instead of
# Install-Module — handy for build servers without PowerShellGet)
# ─────────────────────────────────────────────────────────────────
# 'MyNuGetModule' = @{
# DependencyType = 'PSGalleryNuget'
# Version = '1.2.0'
# Target = 'C:\BuildAgent\Modules'
# }
# ─────────────────────────────────────────────────────────────────
# Git repository dependency
# ─────────────────────────────────────────────────────────────────
# 'MyGitModule' = @{
# DependencyType = 'Git'
# Version = 'main' # Branch, tag, or commit hash
# Source = 'https://github.com/myorg/MyGitModule.git'
# Target = 'C:\Modules\MyGitModule'
# }
# ─────────────────────────────────────────────────────────────────
# FileSystem dependency — copy a local folder or file
# ─────────────────────────────────────────────────────────────────
# 'MyLocalModule' = @{
# DependencyType = 'FileSystem'
# Source = 'C:\Source\MyLocalModule'
# Target = 'C:\Deploy\Modules\MyLocalModule'
# }
# ─────────────────────────────────────────────────────────────────
# Command dependency — run an arbitrary script/command
# (useful for bootstrapping tools that aren't PS modules)
# ─────────────────────────────────────────────────────────────────
# 'InstallDotNetSdk' = @{
# DependencyType = 'Command'
# Source = 'dotnet-install.ps1 -Channel 8.0'
# Tags = @('Build')
# }
# ─────────────────────────────────────────────────────────────────
# Package dependency — uses PackageManagement / OneGet
# ─────────────────────────────────────────────────────────────────
# 'MyPackage' = @{
# DependencyType = 'Package'
# Source = 'nuget' # Provider name
# Version = '4.1.0'
# Target = 'C:\Packages'
# Parameters = @{
# ForceBootstrap = $true
# }
# }
# ─────────────────────────────────────────────────────────────────
# Multiple dependencies with shared tags — useful for grouping
# e.g. invoke only "Test" deps: Invoke-PSDepend -Tags 'Test'
# ─────────────────────────────────────────────────────────────────
# 'TestFrameworkModule' = @{
# Version = '5.4.0'
# Tags = @('Test')
# }
# 'MockingModule' = @{
# Version = '1.0.0'
# Tags = @('Test')
# }
# 'BuildHelperModule' = @{
# Version = 'latest'
# Tags = @('Build')
# }
# ─────────────────────────────────────────────────────────────────
# Credential-protected dependency (private gallery / feed)
# ─────────────────────────────────────────────────────────────────
# 'MyPrivateModule' = @{
# DependencyType = 'PSGalleryModule'
# Version = '2.0.0'
# Parameters = @{
# Repository = 'MyPrivateFeed'
# Credential = $MyCredentialVariable # Pass in at runtime
# }
# }
}