Skip to content

Commit b458eb4

Browse files
authored
ids-tool updated and github action reconfigured (buildingSMART#129)
* Updated ids-tool for folder names and extensions. Recent versions of the repositories have a new approach to the folders and names of the ids files. This commit updates the version of ids-tool, and the path references so that the ids files presented are checked. * Attempt at fixing issue in github checkout action * fixed letter case in yaml * Changing eol on linux shell file.
1 parent 1949ab9 commit b458eb4

File tree

6 files changed

+28
-14
lines changed

6 files changed

+28
-14
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build.sh text eol=lf

.github/workflows/check-test-cases.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@ on:
44
push:
55
paths:
66
- "Development/**"
7-
- "Build/**"
7+
- "build/**"
8+
- "Documentation/**"
89

910
jobs:
1011
check-test-cases:
1112
name: check-test-cases
1213
runs-on: ubuntu-latest
1314
steps:
14-
- uses: actions/checkout@v1
15+
- uses: actions/checkout@v3
1516
- name: Run './build.cmd CheckTestCases'
1617
run: ./build.cmd CheckTestCases

.nuke/build.schema.json

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"AppVeyor",
3030
"AzurePipelines",
3131
"Bamboo",
32+
"Bitbucket",
3233
"Bitrise",
3334
"GitHubActions",
3435
"GitLab",

build/Build.cs

+22-6
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,39 @@ class Build : NukeBuild
1313
public static int Main() => Execute<Build>(x => x.CheckTestCases);
1414

1515
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
16-
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
16+
private readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;
1717

18-
[PackageExecutable("ids-tool.CommandLine", "tools/net6.0/ids-tool.dll")] Tool BcfTool;
19-
private string BcfToolPath => System.IO.Path.GetDirectoryName(ToolPathResolver.GetPackageExecutable("ids-tool.CommandLine", "tools/net6.0/ids-tool.dll"));
18+
[PackageExecutable("ids-tool.CommandLine", "tools/net6.0/ids-tool.dll")]
19+
private Tool IdsTool;
2020

21+
private string IdsToolPath => System.IO.Path.GetDirectoryName(ToolPathResolver.GetPackageExecutable("ids-tool.CommandLine", "tools/net6.0/ids-tool.dll"));
22+
23+
/// <summary>
24+
/// Checks the validity of IDS files in the repository, using ids-tool.
25+
/// The tool is deployed by the annotated <see cref="IdsTool"/>.
26+
/// </summary>
2127
Target CheckTestCases => _ => _
2228
.Executes(() =>
2329
{
30+
// development samples
2431
var schemaFile = Path.Combine(
2532
RootDirectory,
26-
"Development/0.9/ids_09.xsd"
33+
"Development/ids.xsd"
2734
);
2835
var inputFolder = Path.Combine(
2936
RootDirectory,
30-
"Development/0.9"
37+
"Development"
3138
);
3239
var arguments = $"check \"{inputFolder}\" -x \"{schemaFile}\"";
33-
BcfTool(arguments, workingDirectory: BcfToolPath);
40+
IdsTool(arguments, workingDirectory: IdsToolPath);
41+
42+
// test cases
43+
inputFolder = Path.Combine(
44+
RootDirectory,
45+
"Documentation/testcases"
46+
);
47+
arguments = $"check \"{inputFolder}\" -x \"{schemaFile}\"";
48+
IdsTool(arguments, workingDirectory: IdsToolPath);
49+
3450
});
3551
}

build/_build.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="ids-tool.CommandLine" Version="1.0.7" />
14+
<PackageReference Include="ids-tool.CommandLine" Version="1.0.9" />
1515
<PackageReference Include="Nuke.Common" Version="6.2.1" />
1616
</ItemGroup>
1717

global.json

-5
This file was deleted.

0 commit comments

Comments
 (0)