Skip to content

Instantly share code, notes, and snippets.

@aj-adl
Created December 14, 2017 02:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aj-adl/aa977f000f87ba149fcd83f55bd1cbd0 to your computer and use it in GitHub Desktop.
Save aj-adl/aa977f000f87ba149fcd83f55bd1cbd0 to your computer and use it in GitHub Desktop.
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
Copy link
Author

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