buildx: printVersion

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-01-24 00:13:52 +01:00
parent 4f2a155c08
commit fe75972f55
3 changed files with 32 additions and 2 deletions

View File

@@ -71,6 +71,13 @@ export class Buildx {
});
}
public async printVersion() {
const cmd = this.getCommand(['version']);
await exec.exec(cmd.command, cmd.args, {
failOnStdErr: false
});
}
public static parseVersion(stdout: string): string {
const matches = /\sv?([0-9a-f]{7}|[0-9.]+)/.exec(stdout);
if (!matches) {