Skip to content

Commit

Permalink
Release v2.0.5: Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
joeltimothyoh committed May 4, 2020
2 parents fdfe492 + 2bad6de commit 83187a2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 17 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A PowerShell module for compiling [**SourceMod**](https://www.sourcemod.net/) ([

## Requirements

- **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).
- **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).

## Installation

Expand Down Expand Up @@ -45,7 +45,7 @@ Install-Module -Name Compile-SourceScript -Repository PSGallery -Scope AllUsers
### Functions

```powershell
Compile-SourceScript [[-File] <Object>] [-SkipWrapper] [-Force] [<CommonParameters>]
Compile-SourceScript [-File] <String> [-SkipWrapper] [-Force] [<CommonParameters>]
```

#### Example 1
Expand Down
12 changes: 2 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ resources:
type: github
name: theohbrothers/PSModulePublisher
endpoint: startersclan # Check for your 'Type: Github' connection under 'Project Settings' > 'Service connections'
ref: refs/tags/v0.3.2
ref: refs/tags/v0.3.4
- repository: PSRepositoryReleaseManager
type: github
name: theohbrothers/PSRepositoryReleaseManager
endpoint: startersclan
ref: refs/tags/v0.5.1
ref: refs/tags/v0.6.1

stages:
- stage: build_test
Expand Down Expand Up @@ -59,14 +59,6 @@ stages:
- checkout: self
submodules: recursive
- template: templates/azure-pipelines/entrypoint/windows/powershell/continuous-build.yml@PSModulePublisher
- job: windows_powershell_5_0
displayName: '[Windows] PowerShell 5.0'
pool:
vmImage: vs2015-win2012r2
steps:
- checkout: self
submodules: recursive
- template: templates/azure-pipelines/entrypoint/windows/powershell/continuous-build.yml@PSModulePublisher
- stage: publish
displayName: Publish
dependsOn: build_test
Expand Down
7 changes: 4 additions & 3 deletions src/Compile-SourceScript/Public/Compile-SourceScript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,11 @@ function Compile-SourceScript {
}

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

# Throw an error if the copying process failed
Expand Down
Binary file not shown.

0 comments on commit 83187a2

Please sign in to comment.