From 2cb7b408484516849b55c2e375831c48d05214f0 Mon Sep 17 00:00:00 2001 From: mtkennerly Date: Fri, 10 Jul 2020 22:55:12 -0400 Subject: [PATCH] Trim the version --- README.md | 2 +- dist/index.js | 2 +- src/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b43cd17..ef24ffc 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ This requires access to Python in the workflow. * `env-var` (optional, default: `""`): Name of environment variable in which to set the dynamic version. If this is empty, no environment variable will be set. -* `command` (optional, default: `"dunamai from any"`) +* `command` (optional, default: `"dunamai from any"`): Command to run Dunamai. * `args` (optional, default: `""`): Additional arguments to pass to the command. diff --git a/dist/index.js b/dist/index.js index 7642530..730d443 100644 --- a/dist/index.js +++ b/dist/index.js @@ -89,7 +89,7 @@ function main() { else { runCommand("pip install dunamai==" + install); } - var version = runCommand(command + " " + args).toString(); + var version = runCommand(command + " " + args).toString().trim(); core.setOutput("version", version); console.log("Dynamic version: " + version); if (envVar !== "") { diff --git a/src/index.ts b/src/index.ts index fd86c18..680412d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,7 +20,7 @@ function main(): void { runCommand(`pip install dunamai==${install}`); } - const version = runCommand(`${command} ${args}`).toString(); + const version = runCommand(`${command} ${args}`).toString().trim(); core.setOutput("version", version); console.log(`Dynamic version: ${version}`);