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

Keploy server version #216

Merged
merged 4 commits into from
Nov 3, 2022
Merged

Conversation

PankhudiB
Copy link
Contributor

Related Issue

Closes: #206

Describe the changes you've made

Log the version during keploy server startup. Inject the version during go build with ldflags

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.

Local run output by passing dummy version:

image

@github-actions
Copy link

github-actions bot commented Oct 16, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you and congratulations 🎉 for opening your very first pull request in keploy

@PankhudiB
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

…tartup

Signed-off-by: Pankhudi Bhonsle <psbhonsle08@gmail.com>
Signed-off-by: Pankhudi Bhonsle <psbhonsle08@gmail.com>
@@ -22,7 +22,9 @@ jobs:
go-version: 1.17

- name: Build
run: go build -v ./...
run: |
git_hash=$(git rev-parse --short "$GITHUB_SHA")
Copy link
Member

Choose a reason for hiding this comment

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

@PankhudiB as discussed in the issue thread. We should have both the commit-sha and the git-tag logged for the version. We mostly use git-tag for versions but adding commit-sha can. help identify unreleased builds.

@@ -7,7 +7,10 @@ import (
"go.keploy.io/server/server"
)

// Version will be injected during go build with ldflag
var Version = ""
Copy link
Member

Choose a reason for hiding this comment

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

this should also have a default value, maybe something like development

@slayerjain slayerjain merged commit d94ee88 into keploy:main Nov 3, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature]: enable version command for the keploy binary
3 participants