Skip to content

Commit 8b289e2

Browse files
committed
Added GitHubFlowVersion
1 parent ed163f9 commit 8b289e2

File tree

8 files changed

+53
-0
lines changed

8 files changed

+53
-0
lines changed

AzureWebFarm.OctopusDeploy/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3+
<package id="GitHubFlowVersion" version="1.3.1" targetFramework="net45" />
34
<package id="Microsoft.Data.Edm" version="5.2.0" targetFramework="net45" />
45
<package id="Microsoft.Data.OData" version="5.2.0" targetFramework="net45" />
56
<package id="Microsoft.Web.Administration" version="7.0.0.0" targetFramework="net45" />

tools/GitHubFlowVersion/Args.dll

39 KB
Binary file not shown.
38 KB
Binary file not shown.
102 KB
Binary file not shown.
280 KB
Binary file not shown.
862 KB
Binary file not shown.
657 KB
Binary file not shown.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
param($installPath, $toolsPath, $package, $project)
2+
3+
$ErrorActionPreference = "Stop"
4+
5+
if ($project -ne $null)
6+
{
7+
Foreach ($item in $project.ProjectItems)
8+
{
9+
if ($item.Name -eq "ToBeRemoved.txt")
10+
{
11+
$item.Delete()
12+
}
13+
}
14+
}
15+
16+
$gitDir = $null
17+
$workingDirectory = (Get-Item $project.FullName).Directory
18+
Write-Host "Looking for .git directory, starting in $workingDirectory"
19+
while ($true)
20+
{
21+
$possibleGitDir = Join-Path $workingDirectory.FullName ".git"
22+
if (Test-Path $possibleGitDir)
23+
{
24+
$gitDir = $possibleGitDir
25+
Break
26+
}
27+
$parent = $workingDirectory.Parent
28+
if ($parent -eq $null)
29+
{
30+
Break
31+
}
32+
$workingDirectory = $parent;
33+
}
34+
35+
if ($gitDir -ne $null)
36+
{
37+
Write-Host "Found git directory for project at $gitDir"
38+
$repositoryDir = (get-item $gitDir -Force).Parent.FullName
39+
$gitHubFlowToolsDir = Join-Path $repositoryDir "tools\GitHubFlowVersion"
40+
if ((Test-Path $gitHubFlowToolsDir -PathType Container) -eq $true)
41+
{
42+
Write-Host "Directory $gitHubFlowToolsDir already exists, removing old version"
43+
Remove-Item $gitHubFlowToolsDir -Force -Recurse
44+
}
45+
46+
Write-Host "GitHubFlowVersion tools installed to $gitHubFlowToolsDir"
47+
Copy-Item $toolsPath –destination $gitHubFlowToolsDir -recurse -container -force
48+
}
49+
else
50+
{
51+
Write-Host "Cannot find git directory"
52+
}

0 commit comments

Comments
 (0)