From 5684911649f71cb9f3111968f9276d51f3eaab09 Mon Sep 17 00:00:00 2001 From: KnicKnic Date: Sun, 30 Jun 2019 22:30:39 -0700 Subject: [PATCH] add native-powershell --- .gitmodules | 3 +++ azure-pipelines.yml | 26 ++++++++++++++++++++++++-- native-powershell | 1 + 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 160000 native-powershell diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6ab94b6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "native-powershell"] + path = native-powershell + url = https://github.com/KnicKnic/native-powershell.git diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5dfc1e2..bfa4c3c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -11,14 +11,13 @@ pool: variables: solution: '**/*.sln' - buildPlatform: 'Any CPU' + buildPlatform: 'x64' buildConfiguration: 'Release' steps: - checkout: self submodules: true -steps: - task: NuGetToolInstaller@0 - task: NuGetCommand@2 @@ -35,3 +34,26 @@ steps: inputs: platform: '$(buildPlatform)' configuration: '$(buildConfiguration)' + +- task: PowerShell@2 + inputs: + targetType: 'inline' + script: 'choco install -y golang ; + choco install -y mingw ; + refreshenv ; + copy native-powershell\host.h .\powershell\ ; + copy native-powershell\x64\Release\psh_host.dll . ; + copy native-powershell\x64\Release\psh_host.dll .\powershell\ ; + $env:GOBIN=$env:GOPATH + "\bin"; + write-host $env:GOBIN $pwd $env:GOPATH $env:GOROOT; + go get . ; + go build . ;' +- task: CopyFiles@2 + inputs: + sourceFolder: '$(Build.SourcesDirectory)' + contents: '**/$(BuildConfiguration)/**/?(*.exe|*.dll|*.pdb)' + TargetFolder: '$(Build.ArtifactStagingDirectory)' +- task: PublishBuildArtifacts@1 + inputs: + pathtoPublish: '$(Build.ArtifactStagingDirectory)' + artifactName: drop \ No newline at end of file diff --git a/native-powershell b/native-powershell new file mode 160000 index 0000000..fb28fcc --- /dev/null +++ b/native-powershell @@ -0,0 +1 @@ +Subproject commit fb28fcc72a4878422908810a006edcbbd56b35ac