Skip to content

Commit abbbd99

Browse files
author
Summer
authored
Keep one single branch and publish only when tag master branch (#10)
travis enceypt api_key="value" --add env.global
1 parent 4a60b04 commit abbbd99

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

.travis.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
branches:
2-
only:
3-
- master
4-
- develop
51
language: csharp
2+
dotnet: 2.0.2
63
script:
7-
- dotnet test Test/Test.csproj
4+
- dotnet test Test/Test.csproj
5+
deploy:
6+
provider: script
7+
skip_cleanup: true
8+
script: nuget pack -NoDefaultExcludes && nuget push *.nupkg $api_key -Source https://www.nuget.org/api/v2/package
9+
on:
10+
branch: master
11+
tags: true
12+
env:
13+
global:
14+
secure: g/X8Zr73cqAe6AuiAvyrGgPq8iYNukY0qBpAkzawGRyVlIJqm2EIJ40oD9Bo9p9XNRyLbpOTgl+UZQcnrgqkZf+diBXpQvQ4heVepO8DUFQb+9D9/7pxTp8Z9L+pvGBgjdq6lc+L8HYG6nAovy7pjP3S/G8Dzu9MIP09Hj1ODVkLTm5XHPiK5BEwf/hxSjISMXaMbcFxY6WGkuSnOyyNc3dwxcvLaa6nhqNfbUgMapnoTwqmRp8rwgTLrAABfUNNINCPWIYqwY/N65PpzXPoGtOh8DzcXTHO5NmVAvNS8Ruq7U7JynN5SyERHinYG8QkmaOw0DjwAvwH8FgKFFkFCDw3wexsXRJH4EvU48Kds7Wb3jnt5MzWUKEb9PrEjm26FrW2uJbCCIecfIcZZwvNYJaSiGK12d2srxgmnZaSXC7yhkh96JBG5aiCc04M9rO29gQ7CkenS+FR0rz7FJb2SLWiBunn/u6vDeH4hotzRmy3HHX8frki18cwOEHyNGSAeD87rtl8Xy5ShGs24+Q32O08sfiAvdjWoX7vfpeBHHe5F64dIc9cY1SEPxhtseJYgYhJVIBvJNhk9zCYMCUGopS6PdhBjbctEo/3PLFMdxlTJRm8ndRSCtVrSSfkijavanl252jGtob9L4i+YwcuAegfZBBaCrAaLd+7z7wjILI=

Test/Test.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class DotNetFixture : IDisposable
1212
private static string RelativeTemplatePath = @"../../../../content/dotnet-template-azure-iot-edge-module/CSharp/";
1313
public DotNetFixture()
1414
{
15-
Process.Start("dotnet.exe", "new -i " + RelativeTemplatePath).WaitForExit();
15+
Process.Start("dotnet", "new -i " + RelativeTemplatePath).WaitForExit();
1616
}
1717

1818
public void Dispose()
@@ -21,7 +21,7 @@ public void Dispose()
2121

2222
// uninstall does not work now according to dotnet issue
2323
// issue link: https://github.com/dotnet/templating/issues/1226
24-
Process.Start("dotnet.exe", "new -u " + RelativeTemplatePath).WaitForExit();
24+
Process.Start("dotnet", "new -u " + RelativeTemplatePath).WaitForExit();
2525
}
2626
}
2727

@@ -65,7 +65,7 @@ private static string BeforeEach(string target = TargetAll, bool linux64 = true,
6565
var scaffoldName = Path.GetRandomFileName().Replace(".", "").ToString();
6666
FlagFilesMapping[TargetAll] = new List<string> {scaffoldName + ".csproj", "Program.cs", ".gitignore"};
6767
var command = "new aziotedgemodule -n " + scaffoldName + " -t " + target + " -lx " + linux64 + " -wn " + windowsNano + " -s " + skipRestore;
68-
Process.Start("dotnet.exe", command).WaitForExit();
68+
Process.Start("dotnet", command).WaitForExit();
6969
return scaffoldName;
7070
}
7171

0 commit comments

Comments
 (0)