|
1 | 1 | namespace GitVersionTask
|
2 | 2 | {
|
3 |
| - public class GetVersion |
4 |
| - { |
5 |
| - public static Output Execute(Input input) => GitVersionTasks.GetVersion(input); |
| 3 | + using Microsoft.Build.Framework; |
6 | 4 |
|
7 |
| - public sealed class Input : InputBase |
8 |
| - { |
9 |
| - } |
| 5 | + public class GetVersion : GitVersionTaskBase |
| 6 | + { |
| 7 | + [Output] |
| 8 | + public string Major { get; set; } |
10 | 9 |
|
11 |
| - public sealed class Output |
12 |
| - { |
13 |
| - public string Major { get; set; } |
| 10 | + [Output] |
| 11 | + public string Minor { get; set; } |
14 | 12 |
|
15 |
| - public string Minor { get; set; } |
| 13 | + [Output] |
| 14 | + public string Patch { get; set; } |
16 | 15 |
|
17 |
| - public string Patch { get; set; } |
| 16 | + [Output] |
| 17 | + public string PreReleaseTag { get; set; } |
18 | 18 |
|
19 |
| - public string PreReleaseTag { get; set; } |
| 19 | + [Output] |
| 20 | + public string PreReleaseTagWithDash { get; set; } |
20 | 21 |
|
21 |
| - public string PreReleaseTagWithDash { get; set; } |
| 22 | + [Output] |
| 23 | + public string PreReleaseLabel { get; set; } |
22 | 24 |
|
23 |
| - public string PreReleaseLabel { get; set; } |
| 25 | + [Output] |
| 26 | + public string PreReleaseNumber { get; set; } |
24 | 27 |
|
25 |
| - public string PreReleaseNumber { get; set; } |
| 28 | + [Output] |
| 29 | + public string WeightedPreReleaseNumber { get; set; } |
26 | 30 |
|
27 |
| - public string WeightedPreReleaseNumber { get; set; } |
| 31 | + [Output] |
| 32 | + public string BuildMetaData { get; set; } |
28 | 33 |
|
29 |
| - public string BuildMetaData { get; set; } |
| 34 | + [Output] |
| 35 | + public string BuildMetaDataPadded { get; set; } |
30 | 36 |
|
31 |
| - public string BuildMetaDataPadded { get; set; } |
| 37 | + [Output] |
| 38 | + public string FullBuildMetaData { get; set; } |
32 | 39 |
|
33 |
| - public string FullBuildMetaData { get; set; } |
| 40 | + [Output] |
| 41 | + public string MajorMinorPatch { get; set; } |
34 | 42 |
|
35 |
| - public string MajorMinorPatch { get; set; } |
| 43 | + [Output] |
| 44 | + public string SemVer { get; set; } |
36 | 45 |
|
37 |
| - public string SemVer { get; set; } |
| 46 | + [Output] |
| 47 | + public string LegacySemVer { get; set; } |
38 | 48 |
|
39 |
| - public string LegacySemVer { get; set; } |
| 49 | + [Output] |
| 50 | + public string LegacySemVerPadded { get; set; } |
40 | 51 |
|
41 |
| - public string LegacySemVerPadded { get; set; } |
| 52 | + [Output] |
| 53 | + public string AssemblySemVer { get; set; } |
42 | 54 |
|
43 |
| - public string AssemblySemVer { get; set; } |
| 55 | + [Output] |
| 56 | + public string AssemblySemFileVer { get; set; } |
44 | 57 |
|
45 |
| - public string AssemblySemFileVer { get; set; } |
| 58 | + [Output] |
| 59 | + public string FullSemVer { get; set; } |
46 | 60 |
|
47 |
| - public string FullSemVer { get; set; } |
| 61 | + [Output] |
| 62 | + public string InformationalVersion { get; set; } |
48 | 63 |
|
49 |
| - public string InformationalVersion { get; set; } |
| 64 | + [Output] |
| 65 | + public string BranchName { get; set; } |
50 | 66 |
|
51 |
| - public string BranchName { get; set; } |
| 67 | + [Output] |
| 68 | + public string Sha { get; set; } |
52 | 69 |
|
53 |
| - public string Sha { get; set; } |
| 70 | + [Output] |
| 71 | + public string ShortSha { get; set; } |
54 | 72 |
|
55 |
| - public string ShortSha { get; set; } |
| 73 | + [Output] |
| 74 | + public string NuGetVersionV2 { get; set; } |
56 | 75 |
|
57 |
| - public string NuGetVersionV2 { get; set; } |
| 76 | + [Output] |
| 77 | + public string NuGetVersion { get; set; } |
58 | 78 |
|
59 |
| - public string NuGetVersion { get; set; } |
| 79 | + [Output] |
| 80 | + public string NuGetPreReleaseTagV2 { get; set; } |
60 | 81 |
|
61 |
| - public string NuGetPreReleaseTagV2 { get; set; } |
| 82 | + [Output] |
| 83 | + public string NuGetPreReleaseTag { get; set; } |
62 | 84 |
|
63 |
| - public string NuGetPreReleaseTag { get; set; } |
| 85 | + [Output] |
| 86 | + public string CommitDate { get; set; } |
64 | 87 |
|
65 |
| - public string CommitDate { get; set; } |
| 88 | + [Output] |
| 89 | + public string VersionSourceSha { get; set; } |
66 | 90 |
|
67 |
| - public string VersionSourceSha { get; set; } |
| 91 | + [Output] |
| 92 | + public string CommitsSinceVersionSource { get; set; } |
68 | 93 |
|
69 |
| - public string CommitsSinceVersionSource { get; set; } |
| 94 | + [Output] |
| 95 | + public string CommitsSinceVersionSourcePadded { get; set; } |
70 | 96 |
|
71 |
| - public string CommitsSinceVersionSourcePadded { get; set; } |
72 |
| - } |
| 97 | + public override bool Execute() => TaskProxy.GetVersion(this); |
73 | 98 | }
|
74 | 99 | }
|
0 commit comments