Skip to content

Commit 025afe1

Browse files
committed
Merge branch 'hotfix/0.10.1'
* hotfix/0.10.1: (build) Fix version number (build) Switch to latest Cake.Recipe (build) Revert to previous build target (build) Switch to run integration tests (build) Update AppVeyor config file (GH-195) Change the grabbing of console width to be in try/catch
2 parents 8d2e11e + 18b7034 commit 025afe1

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

.appveyor.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,22 @@ image: Visual Studio 2019
1010
build_script:
1111
- ps: .\build.ps1 -Target ContinuousIntegration
1212

13+
#---------------------------------#
1314
# Tests
15+
#---------------------------------#
1416
test: off
1517

18+
#---------------------------------#
19+
# Pull Requests #
20+
#---------------------------------#
21+
pull_requests:
22+
do_not_increment_build_number: true
23+
24+
#---------------------------------#
25+
# General #
26+
#---------------------------------#
27+
skip_branch_with_pr: true
28+
1629
#---------------------------------#
1730
# Branches to build #
1831
#---------------------------------#
@@ -21,6 +34,8 @@ branches:
2134
only:
2235
- develop
2336
- master
37+
- /release\/.*/
38+
- /hotfix\/.*/
2439

2540
#---------------------------------#
2641
# Build Cache #

Source/GitReleaseManager.Cli/Program.cs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ private static void CreateFiglet(BaseSubOptions options)
112112
+ " \\____|_|\\__|_| \\_\\___|_|\\___|\\__,_|___/\\___|_| |_|\\__,_|_| |_|\\__,_|\\__, |\\___|_|\n"
113113
+ " |___/\n"
114114
+ "{0,87}\n";
115-
if (Console.WindowWidth > 87)
115+
116+
if (GetConsoleWidth() > 87)
116117
{
117118
Log.Information(longFormat, version);
118119
}
@@ -122,6 +123,28 @@ private static void CreateFiglet(BaseSubOptions options)
122123
}
123124
}
124125

126+
private static int GetConsoleWidth()
127+
{
128+
try
129+
{
130+
return Console.WindowWidth;
131+
}
132+
catch
133+
{
134+
Log.Verbose("Unable to get the width of the console.");
135+
}
136+
137+
try
138+
{
139+
return Console.BufferWidth;
140+
}
141+
catch
142+
{
143+
Log.Verbose("Unable to get the width of the buffer");
144+
return int.MaxValue;
145+
}
146+
}
147+
125148
private static async Task<int> CreateReleaseAsync(CreateSubOptions subOptions)
126149
{
127150
Log.Information("Creating release...");

recipe.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&version=2.0.0-unstable0157&prerelease
1+
#load nuget:https://www.myget.org/F/cake-contrib/api/v2?package=Cake.Recipe&version=2.0.0-unstable0023&prerelease
22

33
Environment.SetVariableNames(githubUserNameVariable: "GITTOOLS_GITHUB_USERNAME",
44
githubPasswordVariable: "GITTOOLS_GITHUB_PASSWORD");

0 commit comments

Comments
 (0)