Skip to content

Commit ed74139

Browse files
committed
Trying to get travis builds to pass
1 parent 86aab0f commit ed74139

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ os:
88
before_install:
99
- git fetch --unshallow # Travis always does a shallow clone, but GitVersion needs the full history including branches and tags
1010
script:
11+
- export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST
12+
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi)
1113
- ./build.sh
1214
cache:
1315
directories:

build.cake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ Task("Version")
5858
.Does(() =>
5959
{
6060
string url = null;
61+
string branch = null;
6162
// We need to use dynamic repositories on Travis
6263
if (TravisCI.IsRunningOnTravisCI)
6364
{
6465
url = "https://github.com/GitTools/GitVersion.git";
66+
branch = EnvironmentVariable("BRANCH");
67+
Information("Travis branch: {0}", branch);
6568
}
6669

6770
GitVersion(new GitVersionSettings
@@ -70,13 +73,15 @@ Task("Version")
7073
LogFilePath = "console",
7174
OutputType = GitVersionOutput.BuildServer,
7275
ToolPath = @"src\GitVersionExe\bin\Release\GitVersion.exe",
73-
Url = url
76+
Url = url,
77+
Branch = branch
7478
});
7579
GitVersion assertedVersions = GitVersion(new GitVersionSettings
7680
{
7781
OutputType = GitVersionOutput.Json,
7882
ToolPath = @"src\GitVersionExe\bin\Release\GitVersion.exe",
79-
Url = url
83+
Url = url,
84+
Branch = branch
8085
});
8186

8287
version = assertedVersions.MajorMinorPatch;

src/GitVersion.sln.DotSettings

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ II.2.12 <HandlesEvent />
549549
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
550550
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
551551
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsCodeFormatterSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
552+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsParsFormattingSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
552553
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsWrapperSettingsUpgrader/@EntryIndexedValue">True</s:Boolean>
553554
<s:Boolean x:Key="/Default/Environment/UnitTesting/SeparateAppDomainPerAssembly/@EntryValue">True</s:Boolean>
554555
<s:Boolean x:Key="/Default/Environment/UnitTesting/ShadowCopy/@EntryValue">False</s:Boolean>

0 commit comments

Comments
 (0)