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
7 changes: 7 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"dotnet-inspect"
],
"rollForward": false
},
"purview.build": {
"version": "0.5.3",
"commands": [
"purview-build"
],
"rollForward": false
}
}
}
6 changes: 5 additions & 1 deletion .config/purview-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"TestFilter": "/*/*/*/*"
},
"PackValidation": {
// Explicit because Purview.Build 0.5.3 defaults RequiredCompilerFlags to empty. Earlier
// versions forced this check on and could not be configured off, so these packages have
// always been validated against it; declaring it keeps that behaviour.
"RequiredCompilerFlags": ["optimization=release"],
"RequireSymbolPackage": false,
"RequiredContent": {
"purview.telemetry.sourcegenerator": [
Expand All @@ -20,4 +24,4 @@
"Release": {
"Mode": "None"
}
}
}
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@ conventional-commits check.
| `just update-version` | Runs `.build/update-version.ts` to sync the version into docs/samples. |
| `just pack` | Updates the version then packs the NuGet package into `artifacts/`. |

The version lives in `package.json`. **Current Version:** 5.0.2 — applied to `Version` /
`PackageVersion` via the SDK's package.json version detection.
The version lives in `package.json`. **Current Version:** `*` — read from `package.json` at build
time and applied to `Version` / `PackageVersion` via the SDK's package.json version detection. Run
`just version` to print the current value; it is deliberately not duplicated here.

### Pipelines (reusable `purview-build` tool)

Expand Down
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<PropertyGroup>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<RoslynVersion>5.9.0</RoslynVersion>
<TUnitVersion>1.67.0</TUnitVersion>
<PurviewSGFVersion>1.0.0</PurviewSGFVersion>
<TUnitVersion>1.74.0</TUnitVersion>
<PurviewSGFVersion>1.1.0</PurviewSGFVersion>
<DotnetRuntimeVersion>10.0.12</DotnetRuntimeVersion>
<MSExtensionVersion>10.10.0</MSExtensionVersion>
<OpenTelemetryVersion>1.18.0</OpenTelemetryVersion>
Expand Down
21 changes: 9 additions & 12 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ solution_file := root_folder + "Telemetry.SourceGenerator.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"

sample_solution_file := "./samples/SampleApp/SampleApp.slnx"
multiproject_sample_solution_file := "./samples/SampleApp.MultiProject/SampleApp.MultiProject.slnx"
Expand All @@ -20,33 +19,31 @@ benchmark_solution := "./benchmarks/Purview.Telemetry.Benchmarks/Purview.Telemet
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 release pipeline (restore, build, lint, tests, pack, publish, GitHub release)
[group('Pipeline')]
pipeline-release *args:
just ensure-pipeline-tool
echo "Running release pipeline..."
"{{ pipeline_tool }}" --Release:Mode=NuGet {{ args }}
{{ pipeline_tool }} --Release:Mode=NuGet {{ args }}

# Run the release pipeline (restore, build, lint, tests, pack, local nuget publish)
# Note: `just` runs recipes through the shell, which strips backslashes from unquoted arguments.
Expand All @@ -56,21 +53,21 @@ pipeline-release *args:
pipeline-local-release *args:
just ensure-pipeline-tool
echo "Running local release pipeline..."
"{{ pipeline_tool }}" --Release:Mode=LocalNuGet {{ args }}
{{ pipeline_tool }} --Release:Mode=LocalNuGet {{ 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 }}

# Run the pipeline through pack + validate (restore, build, lint, tests, pack, validate pack contents) without publishing/releasing
[group('Pipeline')]
pipeline-pack-validate *args:
just ensure-pipeline-tool
echo "Running pack + validate pipeline..."
"{{ pipeline_tool }}" --Build:RunPack=true --Build:ValidatePack=true --Release:Mode=None {{ args }}
{{ pipeline_tool }} --Build:RunPack=true --Build:ValidatePack=true --Release:Mode=None {{ args }}

# -----------------------------------------------------------------------------
# Build and Test
Expand Down
4 changes: 2 additions & 2 deletions docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Feature branch
| ----------- | ------ | --------- |
| PR gate | `.github/workflows/pr.yml` | Runs the reusable `purview-dev/build` `purview-build.yml` pipeline (restore, build, lint, tests) and builds/tests the sample solution |
| CD pipeline | `.github/workflows/release.yml` | Runs the reusable `purview-dev/build` `purview-release.yml` pipeline on push to `main` |
| Local pipeline | `Justfile` `pipeline-*` recipes | Mirror the CI/CD pipelines locally via the `Purview.Build` tool (`.tools/purview-build`) |
| Local pipeline | `Justfile` `pipeline-*` recipes | Mirror the CI/CD pipelines locally via the `Purview.Build` local tool (`dotnet purview-build`) |

## Developer workflow

Expand Down Expand Up @@ -70,7 +70,7 @@ Merging to `main` triggers `release.yml`, which runs the reusable `purview-relea

## Versioning

- The version lives in `package.json`. **Current Version:** 5.0.2
- The version lives in `package.json`. **Current Version:** `*` (run `just version` to print it)
- It is applied to `Version` / `PackageVersion` by `Purview.BuildSdk` via package.json
version detection (`UsePackageJsonVersion`, default `true`).
- `just version` prints the current version.
Expand Down
4 changes: 2 additions & 2 deletions docs/wiki/Release-Flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Feature branch
| --- | --- | --- |
| PR gate | `.github/workflows/pr.yml` | Runs the reusable `purview-dev/build` `purview-build.yml` pipeline (restore, build, lint, tests) and builds/tests the sample solution. |
| CD pipeline | `.github/workflows/release.yml` | Runs the reusable `purview-dev/build` `purview-release.yml` pipeline on push to `main`. |
| Local pipeline | `Justfile` `pipeline-*` recipes | Mirror the CI/CD pipelines locally via the `Purview.Build` tool (`.tools/purview-build`). |
| Local pipeline | `Justfile` `pipeline-*` recipes | Mirror the CI/CD pipelines locally via the `Purview.Build` local tool (`dotnet purview-build`). |

## Developer workflow

Expand All @@ -27,7 +27,7 @@ Feature branch

## Versioning

- The version lives in `package.json`. **Current Version:** 5.0.0
- The version lives in `package.json`. **Current Version:** `*` (run `just version` to print it)
- It is applied to `Version`/`PackageVersion` by `Purview.BuildSdk` via package.json version detection.
- `just version` prints the current version.
- After bumping `package.json`, run `just update-version` to sync the version into docs/samples.
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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "purview-telemetry-sourcegenerator",
"version": "5.0.2",
"name": "telemetry-sourcegenerator",
"version": "5.0.3",
"description": "Generates [`ActivitySource`](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.activitysource), [`ILogger`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger), and [`Metrics`](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics) based on interface methods.",
"license": "MIT",
"readme": "README.md",
Expand Down
Loading