Trim the version

This commit is contained in:
mtkennerly 2020-07-10 22:55:12 -04:00
parent 16ba39f59a
commit 2cb7b40848
3 changed files with 3 additions and 3 deletions

View file

@ -13,7 +13,7 @@ This requires access to Python in the workflow.
* `env-var` (optional, default: `""`): * `env-var` (optional, default: `""`):
Name of environment variable in which to set the dynamic version. Name of environment variable in which to set the dynamic version.
If this is empty, no environment variable will be set. 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. Command to run Dunamai.
* `args` (optional, default: `""`): * `args` (optional, default: `""`):
Additional arguments to pass to the command. Additional arguments to pass to the command.

2
dist/index.js vendored
View file

@ -89,7 +89,7 @@ function main() {
else { else {
runCommand("pip install dunamai==" + install); runCommand("pip install dunamai==" + install);
} }
var version = runCommand(command + " " + args).toString(); var version = runCommand(command + " " + args).toString().trim();
core.setOutput("version", version); core.setOutput("version", version);
console.log("Dynamic version: " + version); console.log("Dynamic version: " + version);
if (envVar !== "") { if (envVar !== "") {

View file

@ -20,7 +20,7 @@ function main(): void {
runCommand(`pip install dunamai==${install}`); runCommand(`pip install dunamai==${install}`);
} }
const version = runCommand(`${command} ${args}`).toString(); const version = runCommand(`${command} ${args}`).toString().trim();
core.setOutput("version", version); core.setOutput("version", version);
console.log(`Dynamic version: ${version}`); console.log(`Dynamic version: ${version}`);