Skip to content

Conversation

@JaredHatfield
Copy link
Member

  • Set version variable in main.go to be populated during build
  • Update release-go-github.yml to include ldflags for versioning
  • Remove version attribute from README and example forge.yaml

…ration

- Set version variable in main.go to be populated during build
- Update release-go-github.yml to include ldflags for versioning
- Remove version attribute from README and example forge.yaml
Copilot AI review requested due to automatic review settings June 16, 2025 02:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR centralizes version handling by injecting the version at build time and cleans up example/documentation to no longer require a version field in configs.

  • Introduce a global Version var in main.go for ldflags population
  • Update GitHub Actions workflow to pass version via ldflags
  • Remove version attribute from example config files and README

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
main.go Added Version var, removed ForgeConfig.Version, and updated server initialization to use Version
example/forge.yaml Removed the version field from the example config
README.md Deleted references to the version attribute in the config documentation
.github/workflows/release-go-github.yml Added ldflags setting to inject main.Version during builds
Comments suppressed due to low confidence (2)

.github/workflows/release-go-github.yml:48

  • The single quotes inside the ldflags string may be interpreted literally, preventing correct version injection. Remove the single quotes so the flag reads -X main.Version=${{ github.ref_name }}.
ldflags: "-X 'main.Version=${{ github.ref_name }}'"

main.go:26

  • Consider adding a unit or integration test to verify that Version falls back to "dev" by default and can be overridden via ldflags during build.
var Version = "dev" // This will be set by the build systems to the release version

@codecov
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (1557437) to head (5052935).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main     #14   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          1       1           
  Lines        202     202           
=====================================
  Misses       202     202           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JaredHatfield JaredHatfield moved this from Todo to In Progress in UnitVectorY Labs Jun 16, 2025
@JaredHatfield JaredHatfield merged commit ba34acd into main Jun 17, 2025
8 checks passed
@JaredHatfield JaredHatfield deleted the version branch June 17, 2025 01:23
@github-project-automation github-project-automation bot moved this from In Progress to Done in UnitVectorY Labs Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant