File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,8 @@ public static class BuildServerList
13
13
new MyGet ( ) ,
14
14
new Jenkins ( ) ,
15
15
new GitLabCi ( ) ,
16
- new VsoAgent ( )
16
+ new VsoAgent ( ) ,
17
+ new TravisCI ( ) ,
17
18
} ;
18
19
19
20
public static IEnumerable < IBuildServer > GetApplicableBuildServers ( )
Original file line number Diff line number Diff line change
1
+ using System ;
2
+ namespace GitVersion
3
+ {
4
+ public class TravisCI : BuildServerBase
5
+ {
6
+ public override bool CanApplyToCurrentContext ( )
7
+ {
8
+ return "true" . Equals ( Environment . GetEnvironmentVariable ( "TRAVIS" ) ) && "true" . Equals ( Environment . GetEnvironmentVariable ( "CI" ) ) ;
9
+ }
10
+
11
+ public override string GenerateSetVersionMessage ( VersionVariables variables )
12
+ {
13
+ return variables . FullSemVer ;
14
+ }
15
+
16
+ public override string [ ] GenerateSetParameterMessage ( string name , string value )
17
+ {
18
+ return new [ ]
19
+ {
20
+ string . Format ( "GitVersion_{0}={1}" , name , value )
21
+ } ;
22
+ }
23
+ }
24
+ }
25
+
Original file line number Diff line number Diff line change 165
165
<Compile Include =" SemanticVersion.cs" />
166
166
<Compile Include =" SemanticVersionBuildMetaData.cs" />
167
167
<Compile Include =" SemanticVersionPreReleaseTag.cs" />
168
+ <Compile Include =" BuildServers\TravisCI.cs" />
168
169
</ItemGroup >
169
170
<ItemGroup >
170
171
<Content Include =" FodyWeavers.xml" >
You can’t perform that action at this time.
0 commit comments