File tree Expand file tree Collapse file tree 6 files changed +27
-18
lines changed
src/com.unity.editor.tasks/Tests/Editor Expand file tree Collapse file tree 6 files changed +27
-18
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,14 @@ build:
11
11
12
12
commands :
13
13
- powershell scripts\Get-Deps.ps1
14
- - npm install upm-ci-utils@stable -g --registry https://api.bintray.com/npm/unity/unity-npm
15
14
- build.cmd
16
15
- test.cmd
17
- - pack.cmd -u
16
+ - pack.cmd
18
17
19
18
artifacts :
20
19
nuget :
21
20
paths :
22
- - " build/nuget/**/*. nupkg"
21
+ - " build/nuget/**/*nupkg"
23
22
- " nuget.config"
24
23
packman :
25
24
paths :
33
32
- " tests/**/TestResults/*"
34
33
sources :
35
34
paths :
36
- - " build/upm /**/*"
35
+ - " build/packages /**/*"
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ publish_packman:
52
52
commands :
53
53
- npm install upm-ci-utils@stable -g --registry https://api.bintray.com/npm/unity/unity-npm
54
54
{% for package in packages %}
55
- - upm-ci package publish --package-path build\upm \{{ package.name }}
55
+ - upm-ci package publish --package-path build\packages \{{ package.name }}
56
56
{% endfor %}
57
57
58
58
dependencies :
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ test_{{ platform.name }}_{{ editor.version }}:
12
12
commands :
13
13
- npm install upm-ci-utils@stable -g --registry https://api.bintray.com/npm/unity/unity-npm
14
14
{% for package in packages %}
15
- - upm-ci package test --package-path build\upm \{{ package.name }} -u {{editor.version}}
15
+ - upm-ci package test --package-path build\packages \{{ package.name }} -u {{editor.version}}
16
16
{% endfor %}
17
17
18
18
dependencies :
Original file line number Diff line number Diff line change 25
25
<Target Name =" EnumeratePackageFiles" Returns =" @(SourcesToCopy)" >
26
26
<CreateItem
27
27
Include =" $(PackageSourceRootFull)**\*.*;$(RootDir)\extras\$(PackageName)\**\*.*"
28
- Exclude =" $(PackageSourceRootFull)**\*.csproj*;$(PackageSourceRootFull)**\*.ncrunch*;$(PackageSourceRootFull)**\obj\**;$(PackageSourceRootFull)version.json*;$(PackageSourceRootFull)Tests\**;$(RootDir)\extras\$(PackageName)\Tests\**" >
28
+ Exclude =" $(PackageSourceRootFull)**\*.csproj*;$(PackageSourceRootFull)**\*.ncrunch*;$(PackageSourceRootFull)**\obj\**;$(PackageSourceRootFull)version.json*;$(PackageSourceRootFull)Tests\**;$(RootDir)\extras\$(PackageName)\Tests\**;$(PackageSourceRootFull)Tests.meta " >
29
29
<Output TaskParameter =" Include" ItemName =" SourcesToCopy" />
30
30
</CreateItem >
31
31
</Target >
Original file line number Diff line number Diff line change @@ -17,20 +17,26 @@ $srcDir = Join-Path $rootDirectory 'src'
17
17
18
18
New-Item - itemtype Directory - Path $upmDir - Force - ErrorAction SilentlyContinue
19
19
20
+ # the loops I have to go throught to get upm to do the right thing...
20
21
Get-ChildItem - Directory $srcDir | % {
21
22
Write-Output " Packing $ ( $_.Name ) "
22
23
24
+ $pkgdir = Join-Path $upmDir $_.Name
25
+
23
26
$src = Join-Path $packagesDir $_.Name
24
27
$target = $upmDir
25
28
Copy-Item $src $target - Recurse - Force - ErrorAction SilentlyContinue
26
29
27
- $packageDir = Join-Path $srcDir $_.Name
28
- $src = Join-Path $packageDir " Tests"
29
- $target = Join-Path $upmDir $_.Name
30
- Copy-Item $src $target - Recurse - Force - ErrorAction SilentlyContinue
31
- $src = Join-Path $packageDir " Tests.meta"
32
- $target = Join-Path $upmDir $_.Name
30
+ $src = " $srcDir \$ ( $_.Name ) \Tests.meta"
31
+ $target = $pkgdir
33
32
Copy-Item $src $target - Force - ErrorAction SilentlyContinue
34
- $packageDir = Join-Path $upmDir $_.Name
35
- Invoke-Command - Fatal { & upm- ci package pack -- package- path $packageDir }
33
+
34
+ $testsdir = Join-Path $pkgdir " Tests"
35
+ New-Item - itemtype Directory - Path $testsdir - Force - ErrorAction SilentlyContinue
36
+
37
+ $src = " $packagesDir \$ ( $_.Name ) .tests\*"
38
+ $target = " $testsdir \"
39
+ Copy-Item $src $target - Recurse - Force - ErrorAction SilentlyContinue
40
+
41
+ Invoke-Command - Fatal { & upm- ci package pack -- package- path $pkgdir }
36
42
}
Original file line number Diff line number Diff line change @@ -110,9 +110,13 @@ internal SPath TestApp
110
110
testApp = "Packages/com.unity.editor.tasks.tests/Helpers~/Helper.CommandLine.exe" . ToSPath ( ) . Resolve ( ) ;
111
111
if ( ! testApp . Value . FileExists ( ) )
112
112
{
113
- Debug . LogException ( new InvalidOperationException (
114
- "Test helper binaries are missing. Build the UnityTools.sln solution once with `dotnet build` in order to set up the tests." ) ) ;
115
- testApp = SPath . Default ;
113
+ testApp = "Packages/com.unity.editor.tasks.tests/Tests/Helpers~/Helper.CommandLine.exe" . ToSPath ( ) . Resolve ( ) ;
114
+ if ( ! testApp . Value . FileExists ( ) )
115
+ {
116
+ Debug . LogException ( new InvalidOperationException (
117
+ "Test helper binaries are missing. Build the UnityTools.sln solution once with `dotnet build` in order to set up the tests." ) ) ;
118
+ testApp = SPath . Default ;
119
+ }
116
120
}
117
121
}
118
122
}
You can’t perform that action at this time.
0 commit comments