@@ -2,7 +2,8 @@ $PSake.use_exit_on_error = $true
22
33$Here = " $ ( Split-Path - parent $MyInvocation.MyCommand.Definition ) "
44
5- $SolutionRoot = (Split-Path - parent $Here )
5+ $RepoRoot = $ (Split-Path - parent $Here )
6+ $SolutionRoot = " $RepoRoot \src"
67
78$ProjectName = " EventHook"
89$GitHubProjectName = " Windows-User-Action-Hook"
@@ -26,7 +27,7 @@ if(!$Branch) { $Branch = "local" }
2627
2728if ($Branch -eq " beta" ) { $Version = " $Version -beta" }
2829
29- $NuGet = Join-Path $SolutionRoot " .nuget\nuget.exe"
30+ $NuGet = Join-Path $RepoRoot " .nuget\nuget.exe"
3031
3132$MSBuild = " ${env: ProgramFiles(x86)} \Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe"
3233$MSBuild -replace ' ' , ' ` '
@@ -65,12 +66,13 @@ Task Document -depends Build {
6566
6667 if ($Branch -eq " master" )
6768 {
69+
6870 # use docfx to generate API documentation from source metadata
6971 docfx docfx.json
7072
7173 # patch index.json so that it is always sorted
7274 # otherwise git will think file was changed
73- $IndexJsonFile = " $SolutionRoot \docs\index.json"
75+ $IndexJsonFile = " $RepoRoot \docs\index.json"
7476 $unsorted = Get-Content $IndexJsonFile | Out-String
7577 [Reflection.Assembly ]::LoadFile(" $Here \lib\Newtonsoft.Json.dll" )
7678 [System.Reflection.Assembly ]::LoadWithPartialName(" System" )
@@ -79,7 +81,7 @@ Task Document -depends Build {
7981 Set-Content - Path $IndexJsonFile - Value $obj
8082
8183 # setup clone directory
82- $TEMP_REPO_DIR = (Split-Path - parent $SolutionRoot ) + " \temp-repo-clone"
84+ $TEMP_REPO_DIR = (Split-Path - parent $RepoRoot ) + " \temp-repo-clone"
8385
8486 If (test-path $TEMP_REPO_DIR )
8587 {
@@ -101,7 +103,7 @@ Task Document -depends Build {
101103 cd " $TEMP_REPO_DIR \docs"
102104
103105 # copy docs to clone directory\docs
104- Copy-Item - Path " $SolutionRoot \docs\*" - Destination " $TEMP_REPO_DIR \docs" - Recurse - Force
106+ Copy-Item - Path " $RepoRoot \docs\*" - Destination " $TEMP_REPO_DIR \docs" - Recurse - Force
105107
106108 # push changes to master
107109 git config -- global credential.helper store
@@ -119,5 +121,6 @@ Task Document -depends Build {
119121
120122# package nuget files
121123Task Package - depends Document {
122- exec { . $NuGet pack " $SolutionRoot \$ProjectName \$ProjectName .nuspec" - Properties Configuration= $Configuration - OutputDirectory " $SolutionRoot " - Version " $Version " }
124+ exec { . $NuGet pack " $SolutionRoot \$ProjectName \$ProjectName .nuspec" - Properties Configuration= $Configuration - OutputDirectory " $RepoRoot " - Version " $Version " }
123125}
126+
0 commit comments