0
votes

I'm uploading a Universal package to Azure Artifacts from an Azure Pipeline. I want to package the patched version number in the source of the artifact so I can display it in the view.

How should I do this?

This is an Angular project and the artifact is the result of ng build --prod.

This is the upload task:

- task: UniversalPackages@0
  condition: eq(variables.isMaster, true)
  inputs:
    command: 'publish'
    publishDirectory: '$(System.DefaultWorkingDirectory)/dist'
    feedsToUsePublish: 'internal'
    vstsFeedPublish: 'Development/<name_redacted>'
    vstsFeedPackagePublish: '<name_redacted>'
    versionOption: 'patch
1
Can you add more details about your expected behavior? It looks like the configuration of your task can meet your needs.Walter
I get the misunderstanding. What I'm missing is a way to also update the version in the source code (in the package.json for example). I need this to so I can show the deployed version in the webpage. This task only patches the version in the Artifact feed. Does that make sense?Pepijn Compaan

1 Answers

0
votes

In Universal Packages, a particular package is identified by its name and version number. Whenever you publish a new version of the package, you can increase the version according to the updated content. Here is the document about Package versioning. You can also add description about the changes made in this version of the package. You can refer to the sample about use Universal Package task.