Created
December 14, 2017 02:16
-
-
Save aj-adl/aa977f000f87ba149fcd83f55bd1cbd0 to your computer and use it in GitHub Desktop.
bitbucket-sage-rsync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/node_modules | |
/bower_components | |
/assets | |
.git* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 runassets
- excludes all directories called assets at any level in the repo