forked from ironmansoftware/code-conversion
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.ps1
More file actions
31 lines (23 loc) · 994 Bytes
/
build.ps1
File metadata and controls
31 lines (23 loc) · 994 Bytes
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
param($Configuration = 'Debug')
Push-Location $PSScriptRoot
$sourcePath = Join-Path $PSScriptRoot 'src/CodeConversion'
$destPath = Join-Path $PSScriptRoot 'module/CodeConversion'
Remove-Item -Path $destPath -Recurse -Force -ErrorAction SilentlyContinue
New-Item -Path $destPath -ItemType Directory
Copy-Item "CodeConversion.psm1" $destPath
$parameters = @{
Path = "$destPath\CodeConversion.psd1"
Author = ''
CompanyName = ''
ModuleVersion = '1.0.0'
Description = 'Convert C# to PowerShell'
RootModule = "CodeConversion.psm1"
FunctionsToExport = @("Invoke-CSharpConversion")
RequiredAssemblies = 'CodeConversion.dll'
ProjectUri = 'https://github.com/fmichaleczek/code-conversion'
LicenseUri = 'https://github.com/fmichaleczek/code-conversion/blob/main/LICENSE'
}
New-ModuleManifest @parameters
Set-Location $sourcePath
dotnet publish -c $Configuration -o $destPath
Pop-Location