Skip to content

Commit c5ab73b

Browse files
committed
Removing all the references to source files from dbopsfile
1 parent c570082 commit c5ab73b

11 files changed

+200
-442
lines changed

functions/Add-DBOBuild.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ function Add-DBOBuild {
112112
$includeFile = $Type -contains 'All'
113113
if ($Type -contains 'New') {
114114
#Check if the script path was already added in one of the previous builds
115-
if (!$package.SourcePathExists($childScript.SourcePath)) {
115+
if (!$package.PackagePathExists($childScript.PackagePath)) {
116116
$includeFile = $true
117-
Write-PSFMessage -Level Verbose -Message "File $($childScript.SourcePath) was not found among the package source files, adding to the list."
117+
Write-PSFMessage -Level Verbose -Message "File $($childScript.PackagePath) was not found among the package source files, adding to the list."
118118
}
119119
}
120120
if ($Type -contains 'Modified') {
121121
#Check if the file was modified in the previous build
122-
if ($package.ScriptModified($childScript.FullName, $childScript.SourcePath)) {
122+
if ($package.ScriptModified($childScript)) {
123123
$includeFile = $true
124124
Write-PSFMessage -Level Verbose -Message "Hash of the file $($childScript.FullName) was modified since last deployment, adding to the list."
125125
}

functions/Invoke-DBODeployment.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,15 @@
145145
Stop-PSFFunction -Message "Expected DBOpsFile object, got [$($scriptItem.GetType().FullName)]." -EnableException $true
146146
return
147147
}
148-
Write-PSFMessage -Level Debug -Message "Adding deployment script $($scriptItem.SourcePath)"
148+
Write-PSFMessage -Level Debug -Message "Adding deployment script $($scriptItem.FullName)"
149149
if (!$RegisterOnly) {
150150
# Replace tokens in the scripts
151151
$scriptContent = Resolve-VariableToken $scriptItem.GetContent() $runtimeVariables
152152
}
153153
else {
154154
$scriptContent = ""
155155
}
156-
$scriptCollection += [DbUp.Engine.SqlScript]::new($scriptItem.SourcePath, $scriptContent)
156+
$scriptCollection += [DbUp.Engine.SqlScript]::new($scriptItem.FullName, $scriptContent)
157157
}
158158
}
159159

@@ -191,7 +191,7 @@
191191
$status.ConnectionType = $Type
192192
if ($PsCmdlet.ParameterSetName -eq 'Script') {
193193
foreach ($p in $ScriptFile) {
194-
$status.SourcePath += Join-PSFPath -Normalize $p.SourcePath
194+
$status.SourcePath += Join-PSFPath -Normalize $p.FullName
195195
}
196196
}
197197
else {

0 commit comments

Comments
 (0)