Skip to content

add a version subcommand - #30

Merged
tpiperatgod merged 1 commit into
OpenFunction:mainfrom
24sama:main
Feb 12, 2022
Merged

tpiperatgod merged 1 commit into
OpenFunction:mainfrom
24sama:main

Conversation

@24sama

@24sama 24sama commented Feb 12, 2022

Copy link
Copy Markdown
Contributor

What does this PR do?

Fix #28

When we build the source code and this commit doesn't have a tag, we can see:

$ make build
$ ./ofn version
version.BuildInfo{Version:"latest+unreleased", GitCommit:"a1726988dba0e0aa81861e62885ee81712e95c6f", GitTreeState:"dirty", GoVersion:"go1.17.5"}

If we tag this commit, and build the source code:

$ git tag test_version
$ ./ofn version
version.BuildInfo{Version:"test_version", GitCommit:"2604de63104c4498d83678639c26d07bfd616073", GitTreeState:"clean", GoVersion:"go1.17.5"}

@24sama

24sama commented Feb 12, 2022

Copy link
Copy Markdown
Contributor Author

/cc @tpiperatgod @wenchajun

@tpiperatgod

Copy link
Copy Markdown
Member

lgtm, thx @24sama !

@tpiperatgod
tpiperatgod merged commit 30670ee into OpenFunction:main Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adding flags to get version information

2 participants