Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@
"tools": {
"csharpier": {
"version": "1.3.0",
"commands": ["csharpier"],
"commands": [
"csharpier"
],
"rollForward": true
},
"purview.build": {
"version": "0.5.3",
"commands": [
"purview-build"
],
"rollForward": false
}
}
}
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<MSExtensionVersion>10.10.0</MSExtensionVersion>
</PropertyGroup>
<PropertyGroup Label="Purview Versions">
<PurviewTelemetryVersion>5.0.1</PurviewTelemetryVersion>
<PurviewTelemetryVersion>5.0.3</PurviewTelemetryVersion>
</PropertyGroup>
<PropertyGroup Label="Testing Versions">
<TUnitVersion>1.72.4</TUnitVersion>
Expand Down
15 changes: 6 additions & 9 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,42 +10,39 @@ solution_file := root_folder + "EngineeringPlaybook.slnx"
test_solution := solution_file
build_configuration := "Debug"

pipeline_feed := "https://api.nuget.org/v3/index.json"
pipeline_tool := ".tools/purview-build/purview-build"
pipeline_tool := "dotnet purview-build"

# Displays the list of available commands

[private]
default:
just --list

# Install the shared Purview.Build tool (authenticated to the Purview-Dev feed) if not present
# Restore the repository's .NET local tools (.config/dotnet-tools.json)
[private]
ensure-pipeline-tool:
if [ ! -x "{{ pipeline_tool }}" ]; then \
dotnet tool install Purview.Build --tool-path .tools/purview-build --add-source "{{ pipeline_feed }}"; \
fi
dotnet tool restore

# Run the PR pipeline (restore, build, lint, tests)
[group('Pipeline')]
pipeline-pr *args:
just ensure-pipeline-tool
echo "Running PR pipeline..."
"{{ pipeline_tool }}" {{ args }}
{{ pipeline_tool }} {{ args }}

# Run the build pipeline (restore, build, lint)
[group('Pipeline')]
pipeline-build *args:
just ensure-pipeline-tool
echo "Running build pipeline..."
"{{ pipeline_tool }}" --Build:RunTests=false --Release:Mode=None {{ args }}
{{ pipeline_tool }} --Build:RunTests=false --Release:Mode=None {{ args }}

# Run the pipeline with tests enabled
[group('Pipeline')]
pipeline-tests *args:
just ensure-pipeline-tool
echo "Running tests pipeline..."
"{{ pipeline_tool }}" --Build:RunTests=true --Release:Mode=None {{ args }}
{{ pipeline_tool }} --Build:RunTests=true --Release:Mode=None {{ args }}

# -----------------------------------------------------------------------------
# Build and Test
Expand Down
18 changes: 12 additions & 6 deletions docs/wiki/Getting-Started.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,11 +368,20 @@ installed globally per machine:
"version": "1.3.0",
"commands": ["csharpier"],
"rollForward": true
},
"purview.build": {
"version": "0.5.2",
"commands": ["purview-build"],
"rollForward": false
}
}
}
```

`Purview.Build` belongs here too, for the same reason CSharpier does: the manifest pins the version, and
`dotnet tool restore` is the one command that installs it. A repository should never hand-roll
`dotnet tool install --tool-path` for it.

Run `dotnet tool restore` once after adding it.

`Justfile` at the repository root is the list of supported commands. The point of it is that every
Expand All @@ -383,7 +392,7 @@ set quiet

solution_file := "./src/Acme.slnx"
build_configuration := "Debug"
pipeline_tool := ".tools/purview-build/purview-build"
pipeline_tool := "dotnet purview-build"

# Builds the solution
build *args:
Expand All @@ -404,11 +413,8 @@ lint-fix:

# Runs the PR pipeline (restore, build, lint, tests) through the shared tool
pipeline-pr *args:
if [ ! -x "{{ pipeline_tool }}" ]; then \
dotnet tool install Purview.Build --tool-path .tools/purview-build \
--add-source "https://api.nuget.org/v3/index.json"; \
fi
"{{ pipeline_tool }}" {{ args }}
dotnet tool restore
{{ pipeline_tool }} {{ args }}
```

There is deliberately no `Justfile` in `templates/`: the recipes are the list of things *your* repository
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"allowPrerelease": false
},
"msbuild-sdks": {
"Purview.BuildSdk": "1.0.4"
"Purview.BuildSdk": "1.0.5"
},
"test": {
"runner": "Microsoft.Testing.Platform"
Expand Down
2 changes: 1 addition & 1 deletion templates/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<MSExtensionVersion>10.10.0</MSExtensionVersion>
</PropertyGroup>
<PropertyGroup Label="Purview Versions">
<PurviewTelemetryVersion>5.0.1</PurviewTelemetryVersion>
<PurviewTelemetryVersion>5.0.3</PurviewTelemetryVersion>
</PropertyGroup>
<PropertyGroup Label="Testing Versions">
<!--
Expand Down
Loading