Currently, I am in the process of developing a custom task for Azure DevOps Server 2019
. While I have successfully created a .ps1
script for Windows, I am facing challenges with Linux. To tackle this, I have opted to write the script in TypeScript
as I find it more preferable over writing in js
. The script itself is quite straightforward.
let registry = "Registry3";//argv[1]
let timestamp = "2020-01-01";//argv[2]
let repository = "hello-world";//to be looped
az acr repository show-manifests --name registry --repository repository --orderby time_asc -o tsv;
Upon attempting to compile the script using tsc file.ts
, an error arises:
Clean-ACR.ts:54:6 - error TS1005: ';' expected.
54 az acr repository show-manifests --name registry --repository repository --orderby time_asc -o tsv;
~~~
This error persists for each word from "acr" onwards until the end of the line. Clearly, TypeScript is struggling to interpret this particular line due to incorrect syntax. However, I am still uncertain about the correct way to execute this command. As a newcomer to TypeScript, I seek your understanding and pardon my lack of expertise.