@@ -2,7 +2,8 @@ $PSake.use_exit_on_error = $true
2
2
3
3
$Here = " $ ( Split-Path - parent $MyInvocation.MyCommand.Definition ) "
4
4
5
- $SolutionRoot = (Split-Path - parent $Here )
5
+ $RepoRoot = $ (Split-Path - parent $Here )
6
+ $SolutionRoot = " $RepoRoot \src"
6
7
7
8
$ProjectName = " EventHook"
8
9
$GitHubProjectName = " Windows-User-Action-Hook"
@@ -26,7 +27,7 @@ if(!$Branch) { $Branch = "local" }
26
27
27
28
if ($Branch -eq " beta" ) { $Version = " $Version -beta" }
28
29
29
- $NuGet = Join-Path $SolutionRoot " .nuget\nuget.exe"
30
+ $NuGet = Join-Path $RepoRoot " .nuget\nuget.exe"
30
31
31
32
$MSBuild = " ${env: ProgramFiles(x86)} \Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild.exe"
32
33
$MSBuild -replace ' ' , ' ` '
@@ -65,12 +66,13 @@ Task Document -depends Build {
65
66
66
67
if ($Branch -eq " master" )
67
68
{
69
+
68
70
# use docfx to generate API documentation from source metadata
69
71
docfx docfx.json
70
72
71
73
# patch index.json so that it is always sorted
72
74
# otherwise git will think file was changed
73
- $IndexJsonFile = " $SolutionRoot \docs\index.json"
75
+ $IndexJsonFile = " $RepoRoot \docs\index.json"
74
76
$unsorted = Get-Content $IndexJsonFile | Out-String
75
77
[Reflection.Assembly ]::LoadFile(" $Here \lib\Newtonsoft.Json.dll" )
76
78
[System.Reflection.Assembly ]::LoadWithPartialName(" System" )
@@ -79,7 +81,7 @@ Task Document -depends Build {
79
81
Set-Content - Path $IndexJsonFile - Value $obj
80
82
81
83
# 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"
83
85
84
86
If (test-path $TEMP_REPO_DIR )
85
87
{
@@ -101,7 +103,7 @@ Task Document -depends Build {
101
103
cd " $TEMP_REPO_DIR \docs"
102
104
103
105
# 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
105
107
106
108
# push changes to master
107
109
git config -- global credential.helper store
@@ -119,5 +121,6 @@ Task Document -depends Build {
119
121
120
122
# package nuget files
121
123
Task 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 " }
123
125
}
126
+
0 commit comments