Project

General

Profile

Task #1575

add `--version` option to nfd and nrd commands

Added by Alex Afanasyev over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Tools
Target version:
Start date:
05/02/2014
Due date:
% Done:

100%

Estimated time:
3.00 h

Description

Other command-line tools should probably also support --version.

History

#1 Updated by Alex Afanasyev over 5 years ago

  • Category set to Tools
  • Target version set to v0.1

#2 Updated by Junxiao Shi over 5 years ago

Should the version printed include tokens like "rc", "beta"?

Should the version printed include git commit hash? (available only if compiled from git repository)

#3 Updated by Junxiao Shi over 5 years ago

This feature is unnecessary. User can always observe NFD version with nfd-status.

#4 Updated by Beichuan Zhang over 5 years ago

it shouldn't rely on another program to get the version number. what if nfd cannot successfully run? getting the version number would help debugging, but nfdc won't work.

#5 Updated by Alex Afanasyev over 5 years ago

I agree with Beichuan. Getting version from running NFD is one thing, getting version of the tool / nfd binary is another.

As for the other question. I feel that we should include additional information (e.g., for rc-1, it should mention rc-1). For git source-compiled non-release version it also a good idea to include some part of hash (or just git commit in parentheses). However, we should not include this information when somebody uses source code from git, but compiles the released version...

#6 Updated by Davide Pesavento over 5 years ago

A common way to do that is using the output of git describe --always, possibly with --tags and/or --dirty too, when building from a git checkout.

#7 Updated by Junxiao Shi over 5 years ago

  • Assignee set to Davide Pesavento
  • Estimated time set to 3.00 h

Information from core/version.hpp should always be printed.

git describe --always is fine.

The solution should not break when code is not in a git repository (eg. downloaded ZIP from GitHub).

#8 Updated by Alex Afanasyev over 5 years ago

  • Assignee changed from Davide Pesavento to Alex Afanasyev

#9 Updated by Alex Afanasyev over 5 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 70

#10 Updated by Alex Afanasyev over 5 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 70 to 100

#11 Updated by Davide Pesavento over 5 years ago

  • Status changed from Code review to Closed

Also available in: Atom PDF