adam0101
adam0101

Reputation: 31055

Glob pattern in Azure Pipelines to exclude map files and asset folder

I'm trying to use an "Amazon S3 Upload" task in Azure Pipelines to upload all my website files except anything in my "assets" folder and except my JS map files. The glob pattern I tried using is

**/!(assets|*.map)

But my assets folder is still being uploaded. I think glob patterns must work differently in Azure, because an online glob tester showed this would work. What is the correct syntax for excluding a folder and a file type using an Azure task?

Upvotes: 2

Views: 2261

Answers (1)

Leo Liu
Leo Liu

Reputation: 76890

What is the correct syntax for excluding a folder and a file type using an Azure task?

As the state of that option:

enter image description here

This option supports Supports multiple lines of minimatch patterns.

There is a list of file matching patterns you can use and some most important rules.

So, you can try to use following patterns:

**
!**/assets/**
!**/*.map

Hope ths helps.

Upvotes: 4

Related Questions