Skip to content

fix: fix Makefile script.#38

Merged
yuluo-yx merged 2 commits intomainfrom
fix-Makefile
Dec 26, 2025
Merged

fix: fix Makefile script.#38
yuluo-yx merged 2 commits intomainfrom
fix-Makefile

Conversation

@lynx009
Copy link
Contributor

@lynx009 lynx009 commented Dec 24, 2025

According to the 'make run' command in the README file, I tried but it didn't work. After checking the Makefile file, I found that the 'dev' command can run, but I did not find the 'run' command. So I added the 'run' command, which allows' make run 'to run the project and is compatible with the README file.
image

image image

@lynx009 lynx009 changed the title (fix): add Makefile run script. (fix): fix Makefile script. Dec 24, 2025
@lynx009 lynx009 changed the title (fix): fix Makefile script. fix: fix Makefile script. Dec 24, 2025
@lynx009 lynx009 requested review from Copilot and yuluo-yx December 25, 2025 05:26
Copy link

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 adds a run target to the Makefile to align with the make run command documented in the README files. The implementation creates an alias that delegates to the existing dev target, enabling users to successfully run the project using the command shown in the Quick Start documentation.

Key Changes:

  • Added a new run target in the Makefile that acts as an alias for the existing dev target

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

go run cmd/main.go server --config etc/hertzbeat-collector.yaml

.PHONY: run
run: dev ## Golang dev, run main by run. Compatible with dev.
Copy link

Copilot AI Dec 25, 2025

Choose a reason for hiding this comment

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

The comment for the 'run' target is redundant and unclear. Since 'run' is an alias that delegates to 'dev', the comment should describe it as such rather than repeating the same description as 'dev'. Consider changing the comment to something like "Alias for dev target" or "Run the application (alias for dev)" to clarify the relationship and purpose.

Suggested change
run: dev ## Golang dev, run main by run. Compatible with dev.
run: dev ## Alias for dev target (run the application).

Copilot uses AI. Check for mistakes.
go run cmd/main.go server --config etc/hertzbeat-collector.yaml

.PHONY: run
run: dev ## Golang dev, run main by run. Compatible with dev.
Copy link
Member

Choose a reason for hiding this comment

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

其实可以改一下,就叫 dev-run 和 prod run 吧?

dev 和 prod 就是以开发模式和二进制运行的意思

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I made some changes again.

Copy link
Member

@yuluo-yx yuluo-yx left a comment

Choose a reason for hiding this comment

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

LGTM thx

@yuluo-yx yuluo-yx merged commit 934b42a into main Dec 26, 2025
6 checks passed
@yuluo-yx yuluo-yx deleted the fix-Makefile branch December 26, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants