Skip to content

Commit

Permalink
Merge pull request #41 from crimdon/regex-change
Browse files Browse the repository at this point in the history
Regex change
  • Loading branch information
crimdon authored Sep 28, 2017
2 parents 38a309c + de0223f commit e34327a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions RunSingleSqlScript/RunSingleSqlScript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ Try {
#Execute the query
switch ($removeComments) {
$true {
(Get-Content $sqlScript -Encoding UTF8 | Out-String) -replace '(?s)/\*.*?\*/', " " -split '\r?\ngo\r?\n' -notmatch '^\s*$' |
(Get-Content $sqlScript -Encoding UTF8 | Out-String) -replace '(?s)/\*.*?\*/', " " -split '\r?\ngo' -notmatch '^\s*$' |
ForEach-Object { $SqlCmd.CommandText = $_.Trim(); $reader = $SqlCmd.ExecuteNonQuery() }
}
$false {
(Get-Content $sqlScript -Encoding UTF8 | Out-String) -split '\r?\ngo\r?\n' |
(Get-Content $sqlScript -Encoding UTF8 | Out-String) -split '\r?\ngo' -notmatch '^\s*$' |
ForEach-Object { $SqlCmd.CommandText = $_.Trim(); $reader = $SqlCmd.ExecuteNonQuery() }
}
}
Expand Down
2 changes: 1 addition & 1 deletion RunSingleSqlScript/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"version": {
"Major": "2",
"Minor": "3",
"Patch": "4"
"Patch": "7"
},
"groups": [
{
Expand Down
4 changes: 2 additions & 2 deletions RunSqlScripts/RunSqlScripts.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ Try {
#Execute the query
switch ($removeComments) {
$true {
(Get-Content $sqlScript.FullName -Encoding UTF8 | Out-String) -replace '(?s)/\*.*?\*/', " " -split '\r?\ngo\r?\n' -notmatch '^\s*$' |
(Get-Content $sqlScript.FullName -Encoding UTF8 | Out-String) -replace '(?s)/\*.*?\*/', " " -split '\r?\ngo' -notmatch '^\s*$' |
ForEach-Object { $SqlCmd.CommandText = $_.Trim(); $reader = $SqlCmd.ExecuteNonQuery() }
}
$false {
(Get-Content $sqlScript.FullName -Encoding UTF8 | Out-String) -split '\r?\ngo\r?\n' |
(Get-Content $sqlScript.FullName -Encoding UTF8 | Out-String) -split '\r?\ngo' -notmatch '^\s*$' |
ForEach-Object { $SqlCmd.CommandText = $_.Trim(); $reader = $SqlCmd.ExecuteNonQuery() }
}
}
Expand Down
2 changes: 1 addition & 1 deletion RunSqlScripts/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"version": {
"Major": "2",
"Minor": "4",
"Patch": "9"
"Patch": "10"
},
"groups": [
{
Expand Down
2 changes: 1 addition & 1 deletion vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "sql-toolkit",
"name": "SQL Toolkit",
"version": "2.7.3",
"version": "2.7.7",
"publisher": "andrewlackenby",
"public": true,
"categories": [
Expand Down

0 comments on commit e34327a

Please sign in to comment.