From 099b3fa69ee1e5833983dfd795f8dd344af95eb3 Mon Sep 17 00:00:00 2001 From: Burton Rheutan Date: Sun, 26 Jul 2020 22:35:25 -0500 Subject: [PATCH] Remove git refs text from release version input --- ActionsHelp.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ActionsHelp.cs b/ActionsHelp.cs index 329547c..0fe2a56 100644 --- a/ActionsHelp.cs +++ b/ActionsHelp.cs @@ -13,11 +13,16 @@ public static ActionResult ReadInputValues() OctopusURL = Environment.GetEnvironmentVariable("INPUT_OCTOPUS_URL"), OctopusApiKey = Environment.GetEnvironmentVariable("INPUT_API_KEY"), ProjectName = Environment.GetEnvironmentVariable("INPUT_PROJECT_NAME"), - ReleaseVersion = Environment.GetEnvironmentVariable("INPUT_RELEASE_VERSION"), ReleaseId = Environment.GetEnvironmentVariable("INPUT_RELEASE_ID"), EnvironmentName = Environment.GetEnvironmentVariable("INPUT_ENVIRONMENT_NAME"), ChannelName = Environment.GetEnvironmentVariable("INPUT_CHANNEL_NAME") }; + + var version = Environment.GetEnvironmentVariable("INPUT_RELEASE_VERSION"); + if (!string.IsNullOrWhiteSpace(version)) + { + inputResult.Result.ReleaseVersion = version.Replace("refs/tags/", ""); + } var space = Environment.GetEnvironmentVariable("INPUT_SPACE_NAME"); if (!string.IsNullOrWhiteSpace(space))