Skip to content

Commit 98f97a2

Browse files
add openapi version to cmd + fix deprecation message (#311)
* add openapi version to cmd + fix deprecation message * update openapi.json * use raw openapi.json + fix kubernetes secrets endpoint * use spec from cf-api
1 parent e43acfa commit 98f97a2

File tree

4 files changed

+419
-1314
lines changed

4 files changed

+419
-1314
lines changed

lib/interface/cli/commands/root/version.cmd.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
const Command = require('../../Command');
22
const cliPackage = require('./../../../../../package.json');
3+
const openapi = require('./../../../../../openapi.json');
34
const { sdk } = require('../../../../logic');
45

56
const versionCmd = new Command({
67
root: true,
78
requiresAuthentication: false,
8-
command: 'version',
9+
command: 'version [component]',
910
description: 'Print version',
1011
webDocs: {
1112
title: 'version',
@@ -16,7 +17,7 @@ const versionCmd = new Command({
1617
.option('component', {
1718
describe: 'print component version',
1819
alias: 'c',
19-
choices: ['client', 'api', 'hermes', 'nomios'],
20+
choices: ['client', 'api', 'hermes', 'nomios', 'openapi'],
2021
default: 'client',
2122
});
2223
},
@@ -33,6 +34,9 @@ const versionCmd = new Command({
3334
case 'nomios':
3435
ver = await sdk.http({ url: '/nomios/version' }); // not '/api/nomios/version'
3536
break;
37+
case 'openapi':
38+
ver = openapi.info.version;
39+
break;
3640
case 'client':
3741
default:
3842
ver = cliPackage.version;

lib/interface/cli/commands/runtimeEnvironments/create.cmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const Command = require('../../Command');
22
const createRoot = require('../root/create.cmd');
33

4-
const DEPRECATION_MESSAGE = 'Create runtime-environment is been deprecated. Please use Venona to create a runtime-environment';
4+
const DEPRECATION_MESSAGE = 'Create runtime-environment command has been deprecated. Please use Venona to create a runtime-environment';
55
const VENONA_REPO_URL = 'https://github.com/codefresh-io/venona';
66

77
const command = new Command({

0 commit comments

Comments
 (0)