Skip to content

Commit 2eceb02

Browse files
jerome-jutteaucosmo-ray
authored andcommitted
Add --version option
closes #85 Signed-off-by: Jérôme Jutteau <jerome.jutteau@outscale.com>
1 parent 3be1891 commit 2eceb02

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ Optional parameters can be applied to each profile :
117117
}
118118
```
119119

120+
## Get osc-cli version
121+
122+
`--version` option will print osc-cli version and exit.
123+
```
124+
osc-cli --version
125+
```
126+
120127
## Activate bash-completion
121128

122129
### Activate the completion for the current bash session

osc_sdk/sdk.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,9 @@ def main():
780780
print(f.read())
781781
sys.exit()
782782
return 0
783+
elif a == "--version":
784+
print(SDK_VERSION)
785+
return 0
783786

784787
logging.basicConfig(level=logging.ERROR)
785788
fire.Fire(api_connect)

0 commit comments

Comments
 (0)