001// SPDX-FileCopyrightText: 2021 Paul Schaub <vanitasvitae@fsfe.org>
002//
003// SPDX-License-Identifier: Apache-2.0
004
005package sop.cli.picocli.commands;
006
007import picocli.CommandLine;
008import sop.cli.picocli.Print;
009import sop.cli.picocli.SopCLI;
010import sop.operation.Version;
011
012@CommandLine.Command(name = "version", description = "Display version information about the tool",
013        exitCodeOnInvalidInput = 37)
014public class VersionCmd implements Runnable {
015
016    @Override
017    public void run() {
018        Version version = SopCLI.getSop().version();
019
020        Print.outln(version.getName() + " " + version.getVersion());
021    }
022}