Hi!
I'm using Bitbucket Pipelines to deploy files to FTP server.
I need the .yml file to zip only one folder in my repository.
Currently I managed it to leave out all files, but does anyone know how to make it leave out folders?
The two folders I need it to leave out is /src and /node_modules. But it doesn't seem to work the same way as with the files.
This is my .yml code:
image: samueldebruyn/debian-git
pipelines:
default:
- step:
script:
- apt-get update
- apt-get -qq install zip curl
- zip -r $BITBUCKET_REPO_SLUG.zip . -x *.git* *.yml *.js *.wbl *.json *src* *node_modules*
- curl -T $BITBUCKET_REPO_SLUG.zip ftp://left-out/ --user $FTP_USERNAME:$FTP_PASSWORD
Hi Rasmus,
You are SO CLOSE!! In your example, if you escape the asterisks with slashes it will work for you so the command should be:
- zip -r $BITBUCKET_REPO_SLUG.zip . -x *.git* *.yml *.js *.wbl *.json \*src* \*node_modules*
you could also try using quotes, but this seemed the most direct method to me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.