Skip to content

Commit 83187a2

Browse files
committed
Release v2.0.5: Merge branch 'master' into release
2 parents fdfe492 + 2bad6de commit 83187a2

File tree

6 files changed

+10
-17
lines changed

6 files changed

+10
-17
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ A PowerShell module for compiling [**SourceMod**](https://www.sourcemod.net/) ([
1717

1818
## Requirements
1919

20-
- **Windows** with [PowerShell 4.0 or later](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-windows-powershell?view=powershell-5.1), or ***nix** with [PowerShell Core](https://github.com/powershell/powershell).
20+
- **Windows** with [PowerShell 4.0 or later](https://docs.microsoft.com/en-us/powershell/scripting/install/installing-windows-powershell), or ***nix** with [PowerShell Core](https://github.com/powershell/powershell#-powershell).
2121

2222
## Installation
2323

@@ -45,7 +45,7 @@ Install-Module -Name Compile-SourceScript -Repository PSGallery -Scope AllUsers
4545
### Functions
4646

4747
```powershell
48-
Compile-SourceScript [[-File] <Object>] [-SkipWrapper] [-Force] [<CommonParameters>]
48+
Compile-SourceScript [-File] <String> [-SkipWrapper] [-Force] [<CommonParameters>]
4949
```
5050

5151
#### Example 1

azure-pipelines.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ resources:
1717
type: github
1818
name: theohbrothers/PSModulePublisher
1919
endpoint: startersclan # Check for your 'Type: Github' connection under 'Project Settings' > 'Service connections'
20-
ref: refs/tags/v0.3.2
20+
ref: refs/tags/v0.3.4
2121
- repository: PSRepositoryReleaseManager
2222
type: github
2323
name: theohbrothers/PSRepositoryReleaseManager
2424
endpoint: startersclan
25-
ref: refs/tags/v0.5.1
25+
ref: refs/tags/v0.6.1
2626

2727
stages:
2828
- stage: build_test
@@ -59,14 +59,6 @@ stages:
5959
- checkout: self
6060
submodules: recursive
6161
- template: templates/azure-pipelines/entrypoint/windows/powershell/continuous-build.yml@PSModulePublisher
62-
- job: windows_powershell_5_0
63-
displayName: '[Windows] PowerShell 5.0'
64-
pool:
65-
vmImage: vs2015-win2012r2
66-
steps:
67-
- checkout: self
68-
submodules: recursive
69-
- template: templates/azure-pipelines/entrypoint/windows/powershell/continuous-build.yml@PSModulePublisher
7062
- stage: publish
7163
displayName: Publish
7264
dependsOn: build_test

src/Compile-SourceScript/Public/Compile-SourceScript.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,10 +215,11 @@ function Compile-SourceScript {
215215
}
216216

217217
# Alert the user on the situation of the plugin
218-
$updatedPlugin = Get-Item -Path "$PLUGINS_DIR/$($_.Name)"
218+
$updatedPlugin = Get-Item -Path "$PLUGINS_DIR/$($_.Name)" -ErrorAction SilentlyContinue
219+
if (!$updatedPlugin) { "`n Plugin does not exist in the plugins directory." | Write-Host -ForegroundColor Magenta; return }
219220
$updatedPluginHash = (Get-FileHash -Path $updatedPlugin -Algorithm MD5).Hash
220-
if ($updatedPluginHash -eq $compiledPluginHash) { "`n Plugin successfully copied to '$($_.Fullname)'" | Write-Host -ForegroundColor Green }
221-
else { "`n Failed to copy to the plugins directory." | Write-Host -ForegroundColor Magenta; return }
221+
if ($updatedPluginHash -eq $compiledPluginHash) { "`n Plugin successfully copied to '$($updatedPlugin.FullName)'" | Write-Host -ForegroundColor Green }
222+
else { "`n Failed to update existing plugin in the plugins directory." | Write-Host -ForegroundColor Magenta; return }
222223
}
223224

224225
# Throw an error if the copying process failed
-3.37 KB
Binary file not shown.

0 commit comments

Comments
 (0)