Skip to content

Instantly share code, notes, and snippets.

@wimleers
Last active December 11, 2015 01:39
Show Gist options
  • Save wimleers/4524817 to your computer and use it in GitHub Desktop.
Save wimleers/4524817 to your computer and use it in GitHub Desktop.
Initial attempt at .mrconfig for simplified Drupal deployment.
[DEFAULT]
lib =
# @TODO
# http://en.wikipedia.org/wiki/Development,_testing,_acceptance_and_production
environment() {
return dev
}
checkout_drupal_project() {
# Look up variables.
project=`mr config ${MR_REPO//${MR_CONFIG%.*}/} project`
branch=`mr config ${MR_REPO//${MR_CONFIG%.*}/} branch`
version=`mr config ${MR_REPO//${MR_CONFIG%.*}/} version`
target=${MR_REPO##*/}
# Perform checkout.
git clone --recursive --branch $branch http://git.drupal.org/project/$project.git $target --depth 1
cd $target
git checkout $version
}
update_drupal_project() {
# Look up variables.
version=`mr config ${MR_REPO//${MR_CONFIG%.*}/} version`
# Perform update.
git checkout $version
}
checkout = checkout_drupal_project
update = update_drupal_project
[www]
project = drupal
branch = 7.x
version = 7.19
[www/sites/all/modules/cdn]
project = cdn
branch = 7.x-2.x
version = 7.x-2.3
[www/sites/all/modules/opentracker]
project = opentracker
branch = 6.x-1.x
version = 7bfc6c3f0be4addb4996870bc6ebfff5042d90c9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment