Skip to content

Commit d2e1c44

Browse files
committed
Revert "removed Authentication class in favor of AuthenticationInfo"
This reverts commit 10141ad.
1 parent 0a64985 commit d2e1c44

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

src/GitVersionCore.Tests/GitToolsTestingExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static void InitializeRepo(this RemoteRepositoryFixture fixture)
8080
{
8181
var arguments = new Arguments
8282
{
83-
Authentication = new AuthenticationInfo(),
83+
Authentication = new Authentication(),
8484
TargetPath = fixture.LocalRepositoryFixture.RepositoryPath
8585
};
8686
var options = Options.Create(arguments);

src/GitVersionCore/Arguments.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace GitVersion
77
{
88
public class Arguments
99
{
10-
public AuthenticationInfo Authentication;
10+
public Authentication Authentication;
1111

1212
public Config OverrideConfig;
1313
public bool HasOverrideConfig;

src/GitVersionCore/Authentication.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace GitVersion
2+
{
3+
public class Authentication
4+
{
5+
public string Username;
6+
public string Password;
7+
}
8+
}

src/GitVersionExe/ArgumentParser.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,15 @@ public Arguments ParseArguments(string[] commandLineArguments)
123123
if (name.IsSwitch("u"))
124124
{
125125
EnsureArgumentValueCount(values);
126-
if (arguments.Authentication == null) arguments.Authentication = new AuthenticationInfo();
126+
if (arguments.Authentication == null) arguments.Authentication = new Authentication();
127127
arguments.Authentication.Username = value;
128128
continue;
129129
}
130130

131131
if (name.IsSwitch("p"))
132132
{
133133
EnsureArgumentValueCount(values);
134-
if (arguments.Authentication == null) arguments.Authentication = new AuthenticationInfo();
134+
if (arguments.Authentication == null) arguments.Authentication = new Authentication();
135135
arguments.Authentication.Password = value;
136136
continue;
137137
}
@@ -413,14 +413,14 @@ private void AddAuthentication(Arguments arguments)
413413
var username = environment.GetEnvironmentVariable("GITVERSION_REMOTE_USERNAME");
414414
if (!string.IsNullOrWhiteSpace(username))
415415
{
416-
if (arguments.Authentication == null) arguments.Authentication = new AuthenticationInfo();
416+
if (arguments.Authentication == null) arguments.Authentication = new Authentication();
417417
arguments.Authentication.Username = username;
418418
}
419419

420420
var password = environment.GetEnvironmentVariable("GITVERSION_REMOTE_PASSWORD");
421421
if (!string.IsNullOrWhiteSpace(password))
422422
{
423-
if (arguments.Authentication == null) arguments.Authentication = new AuthenticationInfo();
423+
if (arguments.Authentication == null) arguments.Authentication = new Authentication();
424424
arguments.Authentication.Username = password;
425425
}
426426
}

0 commit comments

Comments
 (0)