File tree Expand file tree Collapse file tree 2 files changed +56
-13
lines changed Expand file tree Collapse file tree 2 files changed +56
-13
lines changed Original file line number Diff line number Diff line change 1- version : ' {build}'
1+ version : " {build}"
22image : Visual Studio 2017
33environment :
44 global :
5- DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
6- DOTNET_CLI_TELEMETRY_OPTOUT : 1
5+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE : " 1 "
6+ DOTNET_CLI_TELEMETRY_OPTOUT : " 1 "
77test : off
88branches :
99 only :
1010 - master
1111 - /^release\/.*$/
1212build_script :
13- - ps : ./build.ps1
13+ - ps : ./build.ps1
1414dotnet_csproj :
1515 patch : true
1616 file : ' src\**\*.csproj'
17- version : ' {version}'
18- package_version : ' {version}'
17+ version : " {version}"
18+ package_version : " {version}"
1919artifacts :
20- - path : ' **\*.nupkg'
20+ - path : ' **\*.nupkg'
2121install :
2222 # Push job information to Zeus
2323 - npm install -g @zeus-ci/cli
24- - zeus job update --status=pending -B "%APPVEYOR_PULL_REQUEST_TITLE%" -J "%APPVEYOR_JOB_NAME%"
24+ - bash scripts\ zeus.sh report_pending
2525on_success :
2626 - ps : |
2727 $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH
2828 Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh
2929 bash codecov.sh -f "**\coverage.xml"
3030
31- Resolve-Path -Relative .\src\*\bin\Release\*.nupkg |
32- Foreach-Object { zeus upload -t "application/zip+nupkg" $_};
33- if ($?) { zeus job update --status=passed }
34- else { $host.SetShouldExit(1) }
31+ # Upload *.nupkg files to Zeus
32+ bash scripts/zeus.sh upload_artifacts
3533on_failure :
36- - zeus job update --status=failed
34+ - bash scripts\ zeus.sh report_failed
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Redirect stderr to stdout to avoid weird Powershell errors
3+ exec 2>&1
4+ set -x
5+
6+ export PATH=./node_modules/.bin:$PATH
7+
8+ upload_artifacts () {
9+ zeus upload -t " application/zip+nupkg" ./src/* /bin/Release/* .nupkg
10+ zeus job update --status=passed
11+ }
12+
13+
14+ report_pending () {
15+ zeus job update --status=pending
16+ }
17+
18+
19+ report_failed () {
20+ zeus job update --status=failed
21+ }
22+
23+
24+ check_branch () {
25+ # Ignore errors if not on release branch
26+ if [[ ! " ${APPVEYOR_REPO_BRANCH:- } " =~ ^release/ ]]; then
27+ trap - EXIT
28+ echo " Not on a release branch, ignoring all errors, if any."
29+ exit 0
30+ fi
31+ }
32+
33+ trap check_branch EXIT
34+
35+ command=" ${1:- } "
36+ if [[ " $command " == " upload_artifacts" ]]; then
37+ upload_artifacts
38+ elif [[ " $command " == " report_pending" ]]; then
39+ report_pending
40+ elif [[ " $command " == " report_failed" ]]; then
41+ report_failed
42+ else
43+ echo " Invalid command"
44+ exit 1
45+ fi
You can’t perform that action at this time.
0 commit comments