Skip to content

Commit 6a918e6

Browse files
Merge pull request #21 from michaelmsonne/AddNewFeatures
Add new features for v. 1.2.0.0
2 parents bc5e5ce + 1996431 commit 6a918e6

26 files changed

+1533
-442
lines changed

AdvancedInstaller/AzureDevOpsBackup Installer.aip

Lines changed: 131 additions & 18 deletions
Large diffs are not rendered by default.

AdvancedInstaller/AzureDevOpsBackup Installer.back(22.6).aip

Lines changed: 341 additions & 0 deletions
Large diffs are not rendered by default.

AzureDevOpsBackup/App.config

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,39 @@
77
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
88
<dependentAssembly>
99
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
10-
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
10+
<bindingRedirect oldVersion="0.0.0.0-6.0.3.0" newVersion="6.0.3.0" />
1111
</dependentAssembly>
1212
<dependentAssembly>
1313
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
14-
<bindingRedirect oldVersion="0.0.0.0-8.0.0.5" newVersion="8.0.0.5" />
14+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.6" newVersion="9.0.0.6" />
1515
</dependentAssembly>
1616
<dependentAssembly>
1717
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
18-
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
18+
<bindingRedirect oldVersion="0.0.0.0-9.0.0.6" newVersion="9.0.0.6" />
1919
</dependentAssembly>
2020
<dependentAssembly>
2121
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
22-
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
22+
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
2323
</dependentAssembly>
2424
<dependentAssembly>
2525
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
26-
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
26+
<bindingRedirect oldVersion="0.0.0.0-4.1.6.0" newVersion="4.1.6.0" />
2727
</dependentAssembly>
2828
<dependentAssembly>
2929
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
3030
<bindingRedirect oldVersion="0.0.0.0-5.0.0.1" newVersion="5.0.0.1" />
3131
</dependentAssembly>
3232
<dependentAssembly>
3333
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
34-
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
34+
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
3535
</dependentAssembly>
3636
<dependentAssembly>
3737
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
3838
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
3939
</dependentAssembly>
4040
<dependentAssembly>
4141
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
42-
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
42+
<bindingRedirect oldVersion="0.0.0.0-4.2.4.0" newVersion="4.2.4.0" />
4343
</dependentAssembly>
4444
</assemblyBinding>
4545
</runtime>

AzureDevOpsBackup/AzureDevOpsBackup.csproj

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="packages\LibGit2Sharp.NativeBinaries.2.0.323\build\net46\LibGit2Sharp.NativeBinaries.props" Condition="Exists('packages\LibGit2Sharp.NativeBinaries.2.0.323\build\net46\LibGit2Sharp.NativeBinaries.props')" />
34
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
45
<PropertyGroup>
56
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -28,6 +29,8 @@
2829
<UseApplicationTrust>false</UseApplicationTrust>
2930
<BootstrapperEnabled>true</BootstrapperEnabled>
3031
<TargetFrameworkProfile />
32+
<NuGetPackageImportStamp>
33+
</NuGetPackageImportStamp>
3134
</PropertyGroup>
3235
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3336
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -67,8 +70,11 @@
6770
<Reference Include="CommandLine, Version=2.9.1.0, Culture=neutral, PublicKeyToken=5a870481e358d379, processorArchitecture=MSIL">
6871
<HintPath>packages\CommandLineParser.2.9.1\lib\net461\CommandLine.dll</HintPath>
6972
</Reference>
70-
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
71-
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
73+
<Reference Include="LibGit2Sharp, Version=0.31.0.0, Culture=neutral, PublicKeyToken=7cbde695407f0333, processorArchitecture=MSIL">
74+
<HintPath>packages\LibGit2Sharp.0.31.0\lib\net472\LibGit2Sharp.dll</HintPath>
75+
</Reference>
76+
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.6, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
77+
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.9.0.6\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
7278
</Reference>
7379
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
7480
<HintPath>packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -77,34 +83,34 @@
7783
<HintPath>packages\RestSharp.112.1.0\lib\net48\RestSharp.dll</HintPath>
7884
</Reference>
7985
<Reference Include="System" />
80-
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
81-
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
86+
<Reference Include="System.Buffers, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
87+
<HintPath>packages\System.Buffers.4.6.1\lib\net462\System.Buffers.dll</HintPath>
8288
</Reference>
8389
<Reference Include="System.Core" />
8490
<Reference Include="System.IO.Compression" />
8591
<Reference Include="System.IO.Compression.FileSystem" />
92+
<Reference Include="System.IO.Pipelines, Version=9.0.0.6, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
93+
<HintPath>packages\System.IO.Pipelines.9.0.6\lib\net462\System.IO.Pipelines.dll</HintPath>
94+
</Reference>
8695
<Reference Include="System.Management" />
87-
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
88-
<HintPath>packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
96+
<Reference Include="System.Memory, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
97+
<HintPath>packages\System.Memory.4.6.3\lib\net462\System.Memory.dll</HintPath>
8998
</Reference>
9099
<Reference Include="System.Numerics" />
91-
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
92-
<HintPath>packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
93-
</Reference>
94-
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
95-
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
100+
<Reference Include="System.Numerics.Vectors, Version=4.1.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
101+
<HintPath>packages\System.Numerics.Vectors.4.6.1\lib\net462\System.Numerics.Vectors.dll</HintPath>
96102
</Reference>
97-
<Reference Include="System.Text.Encodings.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
98-
<HintPath>packages\System.Text.Encodings.Web.8.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
103+
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
104+
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.6.1.2\lib\net462\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
99105
</Reference>
100-
<Reference Include="System.Text.Json, Version=8.0.0.5, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
101-
<HintPath>packages\System.Text.Json.8.0.5\lib\net462\System.Text.Json.dll</HintPath>
106+
<Reference Include="System.Text.Encodings.Web, Version=9.0.0.6, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
107+
<HintPath>packages\System.Text.Encodings.Web.9.0.6\lib\net462\System.Text.Encodings.Web.dll</HintPath>
102108
</Reference>
103-
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
104-
<HintPath>packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
109+
<Reference Include="System.Text.Json, Version=9.0.0.6, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
110+
<HintPath>packages\System.Text.Json.9.0.6\lib\net462\System.Text.Json.dll</HintPath>
105111
</Reference>
106-
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
107-
<HintPath>packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
112+
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
113+
<HintPath>packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
108114
</Reference>
109115
<Reference Include="System.Web" />
110116
<Reference Include="System.Xml.Linq" />
@@ -117,18 +123,21 @@
117123
<ItemGroup>
118124
<Compile Include="Class\ApplicationStatus.cs" />
119125
<Compile Include="Class\ApplicationInfo.cs" />
126+
<Compile Include="Class\AzureDevOpsApiClient.cs" />
127+
<Compile Include="Class\ConsoleErrorHelper.cs" />
128+
<Compile Include="Class\HealthChecker.cs" />
120129
<Compile Include="Class\LocalBackupsTasks.cs" />
121130
<Compile Include="Class\LocalLogCleanup.cs" />
122131
<Compile Include="Class\CommandLineParser.cs" />
123132
<Compile Include="Class\LocalFolderTasks.cs" />
124-
<Compile Include="Class\DisplayHelp.cs" />
125-
<Compile Include="Class\Globals.cs" />
126-
<Compile Include="Class\Options.cs" />
133+
<Compile Include="Class\ConsoleHelper.cs" />
134+
<Compile Include="Class\ApplicationGlobals.cs" />
135+
<Compile Include="Class\ArgumentOptions.cs" />
127136
<Compile Include="Class\ReportSender.cs" />
128137
<Compile Include="Class\FileLogger.cs" />
129138
<Compile Include="Class\Files.cs" />
130139
<Compile Include="Class\ReportSenderOptions.cs" />
131-
<Compile Include="Class\Requirements.cs" />
140+
<Compile Include="Class\ApplicationRequirements.cs" />
132141
<Compile Include="Class\SecureArgumentHandler.cs" />
133142
<Compile Include="Class\SecureArgumentHandlerToken.cs" />
134143
<Compile Include="Program.cs" />
@@ -176,4 +185,12 @@
176185
)
177186
</PostBuildEvent>
178187
</PropertyGroup>
188+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
189+
<PropertyGroup>
190+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
191+
</PropertyGroup>
192+
<Error Condition="!Exists('packages\LibGit2Sharp.NativeBinaries.2.0.323\build\net46\LibGit2Sharp.NativeBinaries.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\LibGit2Sharp.NativeBinaries.2.0.323\build\net46\LibGit2Sharp.NativeBinaries.props'))" />
193+
<Error Condition="!Exists('packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets'))" />
194+
</Target>
195+
<Import Project="packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets" Condition="Exists('packages\System.ValueTuple.4.6.1\build\net471\System.ValueTuple.targets')" />
179196
</Project>

AzureDevOpsBackup/AzureDevOpsBackup.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Global
3636
{24DA63B0-77D2-4861-8DC1-C47EB93E88EF}.All|Any CPU.ActiveCfg = DefaultBuild
3737
{24DA63B0-77D2-4861-8DC1-C47EB93E88EF}.All|Any CPU.Build.0 = DefaultBuild
3838
{24DA63B0-77D2-4861-8DC1-C47EB93E88EF}.Debug|Any CPU.ActiveCfg = DefaultBuild
39-
{24DA63B0-77D2-4861-8DC1-C47EB93E88EF}.Debug|Any CPU.Build.0 = DefaultBuild
4039
{24DA63B0-77D2-4861-8DC1-C47EB93E88EF}.DefaultBuild|Any CPU.ActiveCfg = DefaultBuild
4140
{24DA63B0-77D2-4861-8DC1-C47EB93E88EF}.DefaultBuild|Any CPU.Build.0 = DefaultBuild
4241
{24DA63B0-77D2-4861-8DC1-C47EB93E88EF}.Release|Any CPU.ActiveCfg = DefaultBuild

AzureDevOpsBackup/Class/Globals.cs renamed to AzureDevOpsBackup/Class/ApplicationGlobals.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace AzureDevOpsBackup.Class
44
{
5-
public static class Globals
5+
public static class ApplicationGlobals
66
{
77
public static string _currentExeFileName; // The name of the current executable file
88
public static int _errors; // The number of errors that have occurred
@@ -48,5 +48,6 @@ public static class Globals
4848
public static int _repoCount; // The number of repositories in the organization
4949
public static string _emailStatusMessage; // The status message of the email
5050
public static bool _noAttatchLog; // TODO
51+
public static bool _doFullGitBackup; // Whether to do a full git backup or not
5152
}
5253
}

AzureDevOpsBackup/Class/ApplicationInfo.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,25 @@ public static void GetExeInfo()
1212
// Get application data to later use in tool and log
1313
AssemblyCopyrightAttribute copyright = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false)[0] as AssemblyCopyrightAttribute;
1414
// ReSharper disable once PossibleNullReferenceException
15-
Globals._copyrightData = copyright.Copyright;
15+
ApplicationGlobals._copyrightData = copyright.Copyright;
1616

1717
// Get application data to later use in tool and log
18-
Globals._vData = Assembly.GetEntryAssembly()?.GetName().Version.ToString();
18+
ApplicationGlobals._vData = Assembly.GetEntryAssembly()?.GetName().Version.ToString();
1919
var attributes = typeof(Program).GetTypeInfo().Assembly.GetCustomAttributes(typeof(AssemblyTitleAttribute));
2020
var assemblyTitleAttribute = attributes.SingleOrDefault() as AssemblyTitleAttribute;
2121

2222
// Set application name in code and log
23-
Globals.AppName = assemblyTitleAttribute?.Title;
23+
ApplicationGlobals.AppName = assemblyTitleAttribute?.Title;
2424

2525
// Set exe file name in code and log
26-
Globals._currentExeFileName = Path.GetFileName(Process.GetCurrentProcess().MainModule?.FileName);
26+
ApplicationGlobals._currentExeFileName = Path.GetFileName(Process.GetCurrentProcess().MainModule?.FileName);
2727

2828
// Set company name in code and log
2929
var fileName = Assembly.GetEntryAssembly()?.Location;
3030
if (fileName != null)
3131
{
3232
var versionInfo = FileVersionInfo.GetVersionInfo(fileName);
33-
Globals._companyName = versionInfo.CompanyName;
33+
ApplicationGlobals._companyName = versionInfo.CompanyName;
3434
}
3535
}
3636
}

AzureDevOpsBackup/Class/Requirements.cs renamed to AzureDevOpsBackup/Class/ApplicationRequirements.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
using System;
2+
using System.Diagnostics;
23

34
namespace AzureDevOpsBackup.Class
45
{
5-
internal class Requirements
6+
internal class ApplicationRequirements
67
{
78
public static void SystemCheck()
89
{

AzureDevOpsBackup/Class/ApplicationStatus.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ internal class ApplicationStatus
88
public static void ApplicationStartMessage()
99
{
1010
// Log start of program
11-
Message($"Welcome to {Globals.AppName}, v." + Globals._vData + " by " + Globals._companyName, EventType.Information, 1000);
12-
Console.WriteLine($"\nWelcome to {Globals.AppName}, v." + Globals._vData + " by " + Globals._companyName + "\n");
11+
Message($"Welcome to {ApplicationGlobals.AppName}, v." + ApplicationGlobals._vData + " by " + ApplicationGlobals._companyName, EventType.Information, 1000);
12+
Console.WriteLine($"\nWelcome to {ApplicationGlobals.AppName}, v." + ApplicationGlobals._vData + " by " + ApplicationGlobals._companyName + "\n");
1313
}
1414
public static void ApplicationEndMessage()
1515
{
1616
// Log end of program
17-
Message($"End of application - {Globals.AppName}, v." + Globals._vData + "\n", EventType.Information, 1000);
18-
Console.WriteLine($"\nEnd of application - {Globals.AppName}, v. {Globals._vData}\n");
17+
Message($"End of application - {ApplicationGlobals.AppName}, v." + ApplicationGlobals._vData + "\n", EventType.Information, 1000);
18+
Console.WriteLine($"\nEnd of application - {ApplicationGlobals.AppName}, v. {ApplicationGlobals._vData}\n");
1919
}
2020
}
2121
}

AzureDevOpsBackup/Class/Options.cs renamed to AzureDevOpsBackup/Class/ArgumentOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace AzureDevOpsBackup.Class
44
{
5-
public class Options
5+
public class ArgumentOptions
66
{
77
[Option('t', "token", HelpText = "Token to access the API in Azure DevOps (raw token data) or token.bin")]
88
public string Token { get; set; }

0 commit comments

Comments
 (0)