Skip to content

Commit a632e42

Browse files
authored
Merge pull request #4499 from Vogel612/appveyor-shallow-clone
AppVeyor config updates
2 parents df82dc6 + 853f6de commit a632e42

File tree

1 file changed

+43
-22
lines changed

1 file changed

+43
-22
lines changed

appveyor.yml

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,25 @@ hosts:
77
# enforce crlf fixing
88
init:
99
git config --global core.autocrlf true
10-
# restrict how much history we try to grab
11-
clone_depth: 3
10+
11+
# history limited to 15 commits, since we ran into trouble with a limit of 3
12+
# the limit can be rather
13+
clone_depth: 15
14+
# explicitly do not shallow-clone.
15+
# Line-Endings are wrong on github, because of CRLF fixing
16+
# shallow-clone would download a zip, which doesn't fix the line-endings for unit-tests
17+
shallow_clone: false
18+
1219
# ignore a certain subset of files when evaluating build-changes
1320
skip_commits:
1421
files:
1522
- docs/*
1623
- '**/*.md'
17-
# intermediately enable yml changes to trigger builds, because codecov changes only changes the codecov yml ...
18-
# - '**/*.yml'
1924
- license
2025
- License.rtf
2126
branches:
2227
only:
2328
- master
24-
- staging
2529
- next
2630
skip_tags: true
2731

@@ -44,6 +48,7 @@ dotnet_csproj:
4448
file: 'RubberduckBaseProject.csproj' # ;*\Rubberduck.Core.csproj'
4549
version: '{version}'
4650
assembly_version: '{version}'
51+
# patching fails if we try to patch properties we didn't define
4752
#file_version: '{version}'
4853
#informational_version: '{version}'
4954

@@ -61,24 +66,40 @@ build:
6166
# Otherwise we might run tests against artifacts that do not exist
6267
test_script:
6368
# we use -returntargetcode to fail the build if tests fail
64-
- OpenCover.Console.exe -register:user -returntargetcode -target:"nunit3-console.exe" -targetargs:".\RubberduckTests\bin\RubberduckTests.dll" -output:".\Rubberduck_Coverage.xml"
65-
- OpenCover.Console.exe -register:user -returntargetcode -target:"nunit3-console.exe" -targetargs:".\RubberduckTestsCodeAnalysis\bin\RubberduckTestsCodeAnalysis.dll" -output:".\RubberduckCodeAnalysis_Coverage.xml"
69+
- cmd: OpenCover.Console.exe -register:user -returntargetcode -target:"nunit3-console.exe" -targetargs:".\RubberduckTests\bin\RubberduckTests.dll" -output:".\Rubberduck_Coverage.xml"
70+
- cmd: OpenCover.Console.exe -register:user -returntargetcode -target:"nunit3-console.exe" -targetargs:".\RubberduckTestsCodeAnalysis\bin\RubberduckTestsCodeAnalysis.dll" -output:".\RubberduckCodeAnalysis_Coverage.xml"
6671
# when using test_script, after_test seems to not be executed
67-
- codecov -f "Rubberduck_Coverage.xml RubberduckCodeAnalysis_Coverage.xml"
72+
- cmd: codecov -f "Rubberduck_Coverage.xml RubberduckCodeAnalysis_Coverage.xml"
6873

74+
# Define the installer-name depending on what branch we're building on
75+
environment:
76+
installer_dir: Rubberduck.Deployment\InnoSetup\Installers\
6977
for:
70-
- branches:
71-
only:
72-
- next
73-
after_test:
74-
- iscc /O "Rubberduck.Deployment\InnoSetup\Rubberduck.Installer.Build.iss"
75-
- move Rubberduck.Deployment\InnoSetup\Installers\Rubberduck.Setup.exe Rubberduck.Deployment\InnoSetup\Installers\Rubberduck.Setup.%APPVEYOR_BUILD_VERSION%-pre.exe
76-
- branches:
77-
only:
78-
- master
79-
after_test:
80-
- iscc /O "Rubberduck.Deployment\InnoSetup\Rubberduck.Installer.Build.iss"
81-
- move Rubberduck.Deployment\InnoSetup\Installers\Rubberduck.Setup.exe Rubberduck.Deployment\InnoSetup\Installers\Rubberduck.Setup.%APPVEYOR_BUILD_VERSION%-pre.exe
78+
-
79+
branches:
80+
only:
81+
- next
82+
environment:
83+
installer_name: Rubberduck.Setup.%APPVEYOR_BUILD_VERSION%-pre.exe
84+
-
85+
branches:
86+
only:
87+
- master
88+
environment:
89+
installer_name: Rubberduck.Setup.%APPVEYOR_BUILD_VERSION%.exe
90+
-
91+
branches:
92+
except:
93+
- master
94+
- next
95+
environment:
96+
# fall back to calling the installer after the branch we're on
97+
installer_name: Rubberduck.Setup.%APPVEYOR_BUILD_VERSION%-%APPVEYOR_REPO_BRANCH%.exe
98+
99+
# Create Installers for
100+
after_test:
101+
- cmd: iscc /O "Rubberduck.Deployment\InnoSetup\Rubberduck.Installer.Build.iss"
102+
- cmd: move %INSTALLER_DIR%\Rubberduck.Setup.exe %INSTALLER_DIR%\%INSTALLER_NAME%
82103

83104
# grab the installers we produce and upload them to github :)
84105
artifacts:
@@ -91,7 +112,7 @@ deploy:
91112
description: AppVeyor build on [master] - https://ci.appveyor.com/project/rubberduck-vba/rubberduck/build/$(appveyor_build_version)
92113
auth_token:
93114
secure: NVAZgFRSk566SP5QDge5gYRWCaLi4NJJPTNk3QengH15wL9iVldfrFOllbzKXExq
94-
artifact: Rubberduck.Deployment\InnoSetup\Installers\Rubberduck.Setup.$(appveyor_build_version).exe
115+
artifact: $(installer_dir)\$(installer_name)
95116
draft: true
96117
prerelease: false
97118
on:
@@ -102,7 +123,7 @@ deploy:
102123
description: AppVeyor build on [next] - https://ci.appveyor.com/project/rubberduck-vba/rubberduck/build/$(appveyor_build_version)
103124
auth_token:
104125
secure: NVAZgFRSk566SP5QDge5gYRWCaLi4NJJPTNk3QengH15wL9iVldfrFOllbzKXExq
105-
artifact: Rubberduck.Deployment\InnoSetup\Installers\Rubberduck.Setup.$(appveyor_build_version)-pre.exe
126+
artifact: $(installer_dir)\$(installer_name)
106127
draft: false
107128
prerelease: true
108129
on:

0 commit comments

Comments
 (0)