Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile revision info into binary #198

Closed
hzxuzhonghu opened this issue Mar 30, 2024 · 4 comments
Closed

Compile revision info into binary #198

hzxuzhonghu opened this issue Mar 30, 2024 · 4 comments
Labels
good first issue Good for newcomers

Comments

@hzxuzhonghu
Copy link
Member

hzxuzhonghu commented Mar 30, 2024

Task description:

We should compile version,commit hash, and build date into kmesh binary during build. And add version subcommand to allow printing that out.

So it can help developers to know whether they have tested the expected patch.

# kmesh-daemon version
......

This is like kubectl version

Solution:

Who can join or take the task:

The good first issue is intended for first-time contributors to get started on his/her contributor journey.

After a contributor has successfully completed 1-2 good first issue's,
they should be ready to move on to help wanted items, saving the remaining good first issue for other new contributors.

How to join or take the task:

Just reply on the issue with the message /assign in a separate line.

Then, the issue will be assigned to you.

How to ask for help:

If you need help or have questions, please feel free to ask on this issue.
The issue author or other members of the community will guide you through the contribution process.

@hzxuzhonghu hzxuzhonghu added the good first issue Good for newcomers label Mar 30, 2024
@Okabe-Rintarou-0
Copy link
Member

Okabe-Rintarou-0 commented May 23, 2024

Does version here mean kmesh version? How can I get it? Can we pass these parameters(version, commit hash) using environment variables in:

kmesh/Makefile

Lines 80 to 81 in 809e921

$(QUIET) (export PKG_CONFIG_PATH=$(PKG_CONFIG_PATH):$(ROOT_DIR)mk; \
$(GO) build -ldflags $(LDFLAGS) -tags $(ENHANCED_KERNEL) -o $(APPS1) $(GOFLAGS) ./daemon/main.go)

@hzxuzhonghu
Copy link
Member Author

Right, we can pass from here.. FYI https://github.com/kurator-dev/kurator/blame/main/Makefile#L16

@Okabe-Rintarou-0
Copy link
Member

Right, we can pass from here.. FYI https://github.com/kurator-dev/kurator/blame/main/Makefile#L16

thanks!

@hzxuzhonghu
Copy link
Member Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants