Open elibarzilay opened 6 years ago
I really need this feature.
I am running CI for azure static website.
To upload my website, i'm using az stotage blob upload-batch
.
The CI command is something like the following.
az storage blob upload-batch -s "." -d '$web'
But, above command uploads not only my html/css/js but also ./git
, package.js
etc... which I should not upload.
With regexp pattern, I can do something like this.
az storage blob upload-batch -s "." -d '$web' --pattern '\.css|\.js|\.html'
We do support --parttern with some regexp.
--pattern : The pattern used for globbing files or blobs in the source. The supported patterns are '*', '?', '[seq]', and '[!seq]'.
For the case that need to update only html/css/js, you can do 3 commands like: az storage blob upload-batch -s "." -d '$web' --pattern .html az storage blob upload-batch -s "." -d '$web' --pattern .css az storage blob upload-batch -s "." -d '$web' --pattern *.js
@limingu, I opened this issue specifically about regexps, which are far more useful than the globbing patterns which you're pointing at.
Feature request to support regexps.
add to S165.
@elibarzilay May I know which kind of scenario you want to support for regexp pattern? Can you show me an example for the usage?
@Juliehzl, I moved away from the project where I needed this, so I don't remember exactly what I needed it for -- but one example would be an operation on files with a suffix of foo
or bar
: if there are only glob patterns, then such things must be done in two operations and since the time overhead for each use is high, the result is much slower.
IIUC, all
az storage blob
commands that take a--pattern
argument use it as a globbing pattern, and there is no way to specify an actual regexp. Having also a regexp option would be much more useful.