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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.