Skip to content

Instantly share code, notes, and snippets.

@aj-adl
Created Dec 14, 2017
Embed
What would you like to do?
bitbucket-sage-rsync
/node_modules
/bower_components
/assets
.git*
#!/usr/bin/env bash
# rsync basic syntax - rsync (flags) <source> <desintation>
rsync -azvvP --ignore-times --exclude-from excludes.conf ./ user@dest.server.com:/full/path/to/where/your/theme/goes/
@aj-adl

This comment has been minimized.

Copy link
Owner Author

@aj-adl aj-adl commented Dec 14, 2017

When executing in the bitbucket pipelines, make sure the rsync command is running from the root sage theme dir after the build.

excludes.conf can be called literally anything, just change the name in the --exclude-from flag, update the relative path etc

When specifying excludes within exclude.conf, remember rsync ALWAYS uses relative paths

eg:
/assets - excludes the assets directory in the top level dir where the rsync command is run
assets - excludes all directories called assets at any level in the repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment