v12 preparations: Add feature switch to remove id from 'tags' output

Change-type: patch
Connects-to: #1770
Signed-off-by: Scott Lowe <scott@balena.io>
This commit is contained in:
Scott Lowe 2020-05-29 17:07:53 +02:00
parent e4f605d6ac
commit 1693bd91c0

View File

@ -23,6 +23,7 @@ import * as cf from '../utils/common-flags';
import { getBalenaSdk, getVisuals } from '../utils/lazy';
import { disambiguateReleaseParam } from '../utils/normalization';
import { tryAsInteger } from '../utils/validation';
import { isV12 } from '../utils/version';
interface FlagsDef {
application?: string;
@ -111,7 +112,9 @@ export default class TagsCmd extends Command {
}
console.log(
getVisuals().table.horizontal(tags, ['id', 'tag_key', 'value']),
isV12()
? getVisuals().table.horizontal(tags, ['tag_key', 'value'])
: getVisuals().table.horizontal(tags, ['id', 'tag_key', 'value']),
);
}