Skip to content

fix(build): pass VERSION arg through taskfile build and pack steps#112

Merged
j-d-ha merged 9 commits into
mainfrom
fix/version-not-showing-in-generated-code-attribute
Apr 20, 2026
Merged

fix(build): pass VERSION arg through taskfile build and pack steps#112
j-d-ha merged 9 commits into
mainfrom
fix/version-not-showing-in-generated-code-attribute

Conversation

@j-d-ha
Copy link
Copy Markdown
Collaborator

@j-d-ha j-d-ha commented Apr 20, 2026

🚀 Pull Request

📋 Summary

Adds optional VERSION variable support to the build and pack Taskfile tasks, and makes it required for publish and publish-local. Also renames pack-localpublish-local for consistency.

  • task publish VERSION=1.0.0 and task publish-local VERSION=1.0.0 enforce the arg via requires
  • task build and task pack work as before without it — /p:Version is only injected when VERSION is set

✅ Checklist

  • My changes build cleanly
  • I've added/updated relevant tests
  • I've added/updated documentation or README
  • I've followed the coding style for this project
  • I've tested the changes locally (if applicable)

🧪 Related Issues or PRs

N/A


💬 Notes for Reviewers

Also includes the generator fix for AssemblyInformationalVersion fallback (commits 0e8f0e3, 8af41b3) and a regex fix for GeneratedCodeAttribute snapshot tests (7078962).

j-d-ha and others added 8 commits April 19, 2026 12:23
- Fallback to `AssemblyName.Version` when `AssemblyInformationalVersionAttribute` is unavailable.
- Default to "unknown" if both values are missing.
- Enhanced regex to match version strings with a "+" suffix, e.g., `1.2.3+buildinfo`.
- Adjusted formatting for better readability and maintenance.
- Introduced `VERSION` variable in `taskfile.yaml` for custom build versioning.
- Updated `build`, `pack`, and `publish` tasks to include `/p:Version` when `VERSION` is defined.
- Enforced `VERSION` requirement for `publish` and `pack-local` tasks.
- Removed fallback to `AssemblyName.Version` when `AssemblyInformationalVersion` is unavailable.
- Simplified assignment logic to default directly to "unknown".
- Updated task name for clarity and consistency with its purpose.
- No changes to functionality or dependencies.
- Updated `echo` command to display the `VERSION` being published.
- Enhances logging clarity during local NuGet publishing.
- Updated `publish-preview.yml` and `publish-release.yml` to reference `main` instead of `v8.0`.
- Adjusted `release` event trigger syntax in `publish-release.yml` for consistency.
- Ensures workflows use the latest updates from the shared templates.
@github-actions github-actions Bot added the type: fix Bug fix label Apr 20, 2026
- Updated `echo` command to display the `VERSION` being published.
- Improves logging clarity during NuGet package publishing.
@j-d-ha j-d-ha merged commit f8e2cae into main Apr 20, 2026
4 checks passed
@j-d-ha j-d-ha deleted the fix/version-not-showing-in-generated-code-attribute branch April 20, 2026 01:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant