-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintegrate.ps1
More file actions
22 lines (19 loc) · 777 Bytes
/
integrate.ps1
File metadata and controls
22 lines (19 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
if(Get-Module -Name MDO){
}else{
$currentDir = Get-Location
$scriptpath = $MyInvocation.MyCommand.Path
$dir = Split-Path $scriptpath
Set-Location -Path $dir
cd MDO.CLI
dotnet publish --configuration Debug
cd bin/Debug/netcoreapp3.0/publish
$publishPath = Get-Location
cd ../../../../..
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine) + ";$publishPath", [System.EnvironmentVariableTarget]::User)
If(!(Test-Path -Path $PROFILE)){
New-Item -Path $PROFILE -Force
}
$modulePath = Join-Path -Path $currentDir -ChildPath "MDO.psm1"
"Import-Module $modulePath" | Out-File -FilePath $PROFILE -Append
Set-Location -Path $currentDir
}