1
votes

I have an Azure Pipelines Task which uses the azure-pipelines-task-lib (https://github.com/microsoft/azure-pipelines-task-lib) and need to get the version of the task from within my task code (TypeScript). I figured there would be an easy way to do this using the azure-pipelines-task-lib library but if there is, I haven't found it.

The version is specified in the task.json file which is packaged up into the artifact that is built when you're publishing a task and I could parse that easily enough, it just seems a bit kludgy to do so. Does anyone know of a better way of doing this?

Thanks!

1

1 Answers

0
votes

There is no easy way to get task version using the azure-pipelines-task-lib, parse the task.json file is the usual way we can do currently.