Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: enable go run execution by moving main to root#630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
SchulteDev wants to merge6 commits intogithub:main
base:main
Choose a base branch
Loading
fromSchulteDev:main

Conversation

SchulteDev
Copy link

feat: enable go run execution by moving main to root

  • Move main.go to project root to enablego run github.com/github/github-mcp-server@latest
  • Delegate execution to cmd/github-mcp-server package
  • Update build configurations (Dockerfile, .goreleaser.yaml)
  • Fix ldflags paths and import aliases
  • Maintain backwards compatibility with existing cmd structure

@SchulteDevSchulteDev requested a review froma team as acode ownerJuly 3, 2025 08:47
@SchulteDevSchulteDevforce-pushed themain branch 2 times, most recently fromc62d5da toe23b402CompareJuly 4, 2025 12:08
@SamMorrowDrums
Copy link
Collaborator

Thank you for the contribution, historically we considered this a feature as for general usage we want the LD flags set and for end users to use the prebuilt binaries and docker images, while developers have the local code and can run it easily.

Curious what others think but not strongly against this, I just don't think we want people reaching for Go Install as a supported installation method because of the unspecified LD flags etc.

@SchulteDev
Copy link
Author

Ok, I see.

As far as I understand the linker flags it's
(a) for optimizing binary size - which is not relevant in case of "go run" usage
(b) having version, commit, date as part of the compiled program - this would be missing in case of "go run" usage. Maybe I can change the defaults in root_command.go?

At least in my opinion it would be a benefit having the "go run" option additionally to Docker/binary artifacts.

@SamMorrowDrums
Copy link
Collaborator

version, commit, date

So mostly commit and version are significant because we have this as part of the API user agent string so if requests keep failing we can understand which version it is and fix it.

We don't mind for development, but for actual usage we want to know at least the commit.

This isn't a hard no though, I think the current usage patterns are entrenched enough that enabling this pathway won't necessarily be a problem but need to check with@toby a d others internally.

SchulteDev reacted with thumbs up emoji

@SchulteDev
Copy link
Author

Just an idea: When doing a release using goreleaser, the defaults in root_command.go could be set to the current version/commit/date for the specific release.

@SchulteDev
Copy link
Author

This would maybe be it

chore: extract versioning logic into script and simplify ldflags- Moved version management to `script/update-version` for easier maintenance.- Removed complex ldflags from Dockerfile and `.goreleaser.yaml`.- Integrated version update step in GitHub Actions workflow.

version-update.patch

- Move main.go to project root to enable `go run github.com/github/github-mcp-server@latest`- Delegate execution to cmd/github-mcp-server package- Update build configurations (Dockerfile, .goreleaser.yaml)- Fix ldflags paths and import aliases- Maintain backwards compatibility with existing cmd structure
- Replace all occurrences of `SchulteDev/github_github-mcp-server` with `github/github-mcp-server`- Update import paths, documentation, and build configurations for new repository location
- Shortened ldflags paths in Dockerfile and .goreleaser.yaml for clarity.- Updated .gitignore to cover binaries more broadly (`github-mcp-server*`).
SchulteDev added a commit to SchulteDev/github_github-mcp-server that referenced this pull requestJul 16, 2025
Refactor build metadata injection logic:- Introduced `build_info` package to manage version, commit, and date details.- Removed ldflags-based metadata injection.- Updated workflows and Dockerfile to prepare `build_info` files.- Added unit tests for `build_info` initialization and formatting.Because: Since build-metadata no longer needs compiling to binary, this information can already be defined at the source code level.Relatedgithub#630
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@SchulteDev@SamMorrowDrums

[8]ページ先頭

©2009-2025 Movatter.jp