Skip to content

Commit 7997f8c

Browse files
committed
appveyor: Reenable tests and add packaging artifacts
1 parent eff8642 commit 7997f8c

File tree

9 files changed

+157
-157
lines changed

9 files changed

+157
-157
lines changed

.appveyor.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@ environment:
66
# Don't report back to the mothership
77
DOTNET_CLI_TELEMETRY_OPTOUT: 1
88

9-
install:
10-
- ps: scripts\Get-Deps.ps1
11-
129
before_build:
13-
- dotnet --info
1410
- appveyor-retry dotnet restore -v Minimal
1511

1612
build_script:
17-
- dotnet build --no-restore -c %CONFIGURATION%
13+
- .\build -c %CONFIGURATION%
1814

1915
test:
2016
assemblies:
@@ -25,13 +21,10 @@ test:
2521
- DoNotRunOnAppVeyor
2622

2723
after_test:
28-
- : |
29-
dotnet pack --no-restore -c %CONFIGURATION%
30-
set OUTDIR=build\npm
31-
set SRCDIR=build\packages
32-
mkdir %OUTDIR% >nul 2>nul || ver>nul
33-
for /f "delims=" %%d in ('dir /b /a:d %SRCDIR%') do (pushd %SRCDIR%\%%d && for /f "delims=" %%f in ('call npm pack --quiet') do move %%f ..\..\npm\%%f && popd)
24+
- .\pack -c %CONFIGURATION%
3425

3526
artifacts:
36-
- path: build\npm\*.tgz
37-
name: Npm
27+
- path: upm-ci~\packages\*
28+
name: npm
29+
- path: build\nuget\**\*.nupkg
30+
name: nuget

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ trim_trailing_whitespace=true
1010
indent_style=tab
1111
indent_size=tab
1212

13-
[*.{config,csproj,json,nuspec,props,resxtargets,targets,sh}]
13+
[*.{config,csproj,json,nuspec,props,resxtargets,targets,sh,cmd}]
1414
indent_style=space
1515
indent_size=2
1616
tab_width=2

build.cmd

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,42 +9,51 @@ SET CONFIGURATION=Release
99
SET PUBLIC=""
1010
SET BUILD=0
1111
set UPM=0
12+
set UNITYVERSION=2019.2
1213

1314
:loop
1415
IF NOT "%1"=="" (
15-
IF "%1"=="-p" (
16-
SET PUBLIC=/p:PublicRelease=true
17-
)
18-
IF "%1"=="--public" (
19-
SET PUBLIC=/p:PublicRelease=true
20-
)
21-
IF "%1"=="-b" (
22-
SET BUILD=1
23-
)
24-
IF "%1"=="--build" (
25-
SET BUILD=1
26-
)
27-
IF "%1"=="-d" (
28-
SET CONFIGURATION=Debug
29-
)
30-
IF "%1"=="--debug" (
31-
SET CONFIGURATION=Debug
32-
)
33-
IF "%1"=="-r" (
34-
SET CONFIGURATION=Release
35-
)
36-
IF "%1"=="--release" (
37-
SET CONFIGURATION=Release
38-
)
39-
IF "%1"=="-u" (
40-
SET UPM=1
41-
)
42-
IF "%1"=="--upm" (
43-
SET UPM=1
44-
)
16+
IF "%1"=="-p" (
17+
SET PUBLIC=-p:PublicRelease=true
18+
)
19+
IF "%1"=="--public" (
20+
SET PUBLIC=-p:PublicRelease=true
21+
)
22+
IF "%1"=="-b" (
23+
SET BUILD=1
24+
)
25+
IF "%1"=="--build" (
26+
SET BUILD=1
27+
)
28+
IF "%1"=="-d" (
29+
SET CONFIGURATION=Debug
30+
)
31+
IF "%1"=="--debug" (
32+
SET CONFIGURATION=Debug
33+
)
34+
IF "%1"=="-r" (
35+
SET CONFIGURATION=Release
36+
)
37+
IF "%1"=="--release" (
38+
SET CONFIGURATION=Release
39+
)
40+
IF "%1"=="-u" (
41+
SET UPM=1
42+
)
43+
IF "%1"=="--upm" (
44+
SET UPM=1
45+
)
46+
IF "%1"=="-c" (
47+
SET CONFIGURATION=%2
4548
SHIFT
46-
GOTO :loop
49+
)
50+
SHIFT
51+
GOTO :loop
52+
)
53+
54+
if "%APPVEYOR%" == "" (
55+
dotnet restore
4756
)
4857

49-
dotnet restore
5058
dotnet build --no-restore -c %CONFIGURATION% %PUBLIC%
59+

build.sh

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,37 @@ while (( "$#" )); do
1717
case "$1" in
1818
-d|--debug)
1919
CONFIGURATION="Debug"
20-
shift
2120
;;
2221
-r|--release)
2322
CONFIGURATION="Release"
24-
shift
2523
;;
2624
-p|--public)
27-
PUBLIC="/p:PublicRelease=true"
28-
shift
25+
PUBLIC="-p:PublicRelease=true"
2926
;;
3027
-b|--build)
3128
BUILD=1
32-
shift
3329
;;
3430
-u|--upm)
3531
UPM=1
32+
;;
33+
-c)
3634
shift
35+
CONFIGURATION=$1
3736
;;
3837
-*|--*=) # unsupported flags
3938
echo "Error: Unsupported flag $1" >&2
4039
exit 1
4140
;;
42-
*)
43-
shift
4441
;;
4542
esac
43+
shift
4644
done
4745

48-
if [[ x"$OS" == x"Windows" && x"$PUBLIC" != x"" ]]; then
49-
PUBLIC="/$PUBLIC"
50-
fi
51-
5246
pushd $DIR >/dev/null 2>&1
53-
dotnet build-server shutdown >/dev/null 2>&1 || true
54-
dotnet restore
47+
48+
if [[ x"$APPVEYOR" == x"" ]]; then
49+
dotnet restore
50+
fi
5551
dotnet build --no-restore -c $CONFIGURATION $PUBLIC
52+
5653
popd >/dev/null 2>&1

pack.cmd

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,53 @@ SET CONFIGURATION=Release
99
SET PUBLIC=""
1010
SET BUILD=0
1111
set UPM=0
12+
set UNITYVERSION=2019.2
1213

1314
:loop
1415
IF NOT "%1"=="" (
15-
IF "%1"=="-p" (
16-
SET PUBLIC=/p:PublicRelease=true
17-
)
18-
IF "%1"=="--public" (
19-
SET PUBLIC=/p:PublicRelease=true
20-
)
21-
IF "%1"=="-b" (
22-
SET BUILD=1
23-
)
24-
IF "%1"=="--build" (
25-
SET BUILD=1
26-
)
27-
IF "%1"=="-d" (
28-
SET CONFIGURATION=Debug
29-
)
30-
IF "%1"=="--debug" (
31-
SET CONFIGURATION=Debug
32-
)
33-
IF "%1"=="-r" (
34-
SET CONFIGURATION=Release
35-
)
36-
IF "%1"=="--release" (
37-
SET CONFIGURATION=Release
38-
)
39-
IF "%1"=="-u" (
40-
SET UPM=1
41-
)
42-
IF "%1"=="--upm" (
43-
SET UPM=1
44-
)
16+
IF "%1"=="-p" (
17+
SET PUBLIC=-p:PublicRelease=true
18+
)
19+
IF "%1"=="--public" (
20+
SET PUBLIC=-p:PublicRelease=true
21+
)
22+
IF "%1"=="-b" (
23+
SET BUILD=1
24+
)
25+
IF "%1"=="--build" (
26+
SET BUILD=1
27+
)
28+
IF "%1"=="-d" (
29+
SET CONFIGURATION=Debug
30+
)
31+
IF "%1"=="--debug" (
32+
SET CONFIGURATION=Debug
33+
)
34+
IF "%1"=="-r" (
35+
SET CONFIGURATION=Release
36+
)
37+
IF "%1"=="--release" (
38+
SET CONFIGURATION=Release
39+
)
40+
IF "%1"=="-u" (
41+
SET UPM=1
42+
)
43+
IF "%1"=="--upm" (
44+
SET UPM=1
45+
)
46+
IF "%1"=="-c" (
47+
SET CONFIGURATION=%2
4548
SHIFT
46-
GOTO :loop
49+
)
50+
SHIFT
51+
GOTO :loop
4752
)
4853

4954
if "x%BUILD%"=="x1" (
50-
dotnet restore
51-
dotnet build --no-restore -c %CONFIGURATION% %PUBLIC%
55+
if "%APPVEYOR%" == "" (
56+
dotnet restore
57+
)
58+
dotnet build --no-restore -c %CONFIGURATION% %PUBLIC%
5259
)
5360

5461
dotnet pack --no-restore --no-build -c %CONFIGURATION% %PUBLIC%

pack.sh

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,41 +17,37 @@ while (( "$#" )); do
1717
case "$1" in
1818
-d|--debug)
1919
CONFIGURATION="Debug"
20-
shift
2120
;;
2221
-r|--release)
2322
CONFIGURATION="Release"
24-
shift
2523
;;
2624
-p|--public)
27-
PUBLIC="/p:PublicRelease=true"
28-
shift
25+
PUBLIC="-p:PublicRelease=true"
2926
;;
3027
-b|--build)
3128
BUILD=1
32-
shift
3329
;;
3430
-u|--upm)
3531
UPM=1
32+
;;
33+
-c)
3634
shift
35+
CONFIGURATION=$1
3736
;;
3837
-*|--*=) # unsupported flags
3938
echo "Error: Unsupported flag $1" >&2
4039
exit 1
4140
;;
42-
*)
43-
shift
4441
;;
4542
esac
43+
shift
4644
done
4745

48-
if [[ x"$OS" == x"Windows" && x"$PUBLIC" != x"" ]]; then
49-
PUBLIC="/$PUBLIC"
50-
fi
51-
5246
pushd $DIR >/dev/null 2>&1
5347
if [[ x"$BUILD" == x"1" ]]; then
54-
dotnet restore
48+
if [[ x"$APPVEYOR" == x"" ]]; then
49+
dotnet restore
50+
fi
5551
dotnet build --no-restore -c $CONFIGURATION $PUBLIC
5652
fi
5753
dotnet pack --no-build --no-restore -c $CONFIGURATION $PUBLIC

0 commit comments

Comments
 (0)