Skip to content
Andy Hieb edited this page May 9, 2013 · 8 revisions

Welcome to the wiki. Please use the README.md file for documenting the theme. This area might be useful for developer-only references.

Workflow

  • The 'master' branch is stable and "deployable"
  • Commit simple changes against the 'dev' branch
  • Use local feature branches for bigger changes and merge into 'dev' when ready
  • Merge 'dev' into 'master' and tag for releases

Initial Setup

 # First, clone the repo from Github.
 me@foo:/var/www$ git clone git://github.com/uw-drupal/UW-Drupal-Theme.git uw-drupal
 Cloning into 'uw-drupal'...
 remote: Counting objects: 467, done.
 remote: Compressing objects: 100% (291/291), done.
 remote: Total 467 (delta 190), reused 441 (delta 164)
 Receiving objects: 100% (467/467), 1.52 MiB | 656 KiB/s, done.
 Resolving deltas: 100% (190/190), done.
 me@foo:/var/www$ cd uw-drupal
 me@foo:/var/www/uw-drupal$ git branch -a
 * master
   remotes/origin/HEAD -> origin/master
   remotes/origin/bootstrap
   remotes/origin/dev
   remotes/origin/master
 # Next, create a local 'dev' branch that tracks the 'dev' branch on 
 # Github, and switch to it.
 me@foo:/var/www/uw-drupal$ git checkout -b dev origin/dev
 Branch dev set up to track remote branch dev from origin.
 Switched to a new branch 'dev'
 me@foo:/var/www/uw-drupal$ git branch -a
 * dev
   master
   remotes/origin/HEAD -> origin/master
   remotes/origin/bootstrap
   remotes/origin/dev
   remotes/origin/master
 me@foo:/var/www/uw-drupal$

Workflow for Simple Changes: commit against 'dev' branch

me@foo:/var/www/uw-drupal$ git checkout dev
Switched to branch 'dev'
me@foo:/var/www/uw-drupal$ git pull --rebase
# Hack, hack, hack
# Take a break
# Hack, hack, hack
me@foo:/var/www/uw-drupal$ git commit -m "Fixed a css bug."
me@foo:/var/www/uw-drupal$ git pull --rebase
me@foo:/var/www/uw-drupal$ git push
# Changes are sent to Github
me@foo:/var/www/uw-drupal$

Workflow for Bigger Changes: commit against local topic branches

me@foo:/var/www/uw-drupal$ git checkout -b my-new-feature
Switched to a new branch 'my-new-feature'
# Hack, hack, hack
# Take a break
# Hack, hack, hack
me@foo:/var/www/uw-drupal$ git commit -m "Making some progress on my new feature."
# A few days pass...
# Let's get the latest changes from dev to be sure our work's not stale...
me@foo:/var/www/uw-drupal$ git checkout dev
Switched to branch 'dev'
me@foo:/var/www/uw-drupal$ git pull --rebase
me@foo:/var/www/uw-drupal$ git checkout my-new-feature
Switched to branch 'my-new-feature'
me@foo:/var/www/uw-drupal$ git merge dev
# Hack, hack, hack
me@foo:/var/www/uw-drupal$ git commit -m "Adding my new feature."
me@foo:/var/www/uw-drupal$ git checkout dev
Switched to branch 'dev'
me@foo:/var/www/uw-drupal$ git pull --rebase
me@foo:/var/www/uw-drupal$ git merge --no-ff my-new-feature
# Merges changes from my-new-feature into dev, forcing a merge commit so
# we can err on the side of being verbose.
me@foo:/var/www/uw-drupal$ git push
# Changes are sent to Github
me@foo:/var/www/uw-drupal$

@TODO:

  • Should we incorporate Github Pull Requests into this flow?
  • Who should do the integration and tagging for a release?
  • How do Github "milestones" compare to Git tags?

Stylesheets

Do not edit any stylesheets in the CSS directory--such changes will be overwritten and lost.

We are using Sass+compass as a CSS preprocessor. To modify stylesheets, edit the corresponding .scss file, then compile using compass watch or compass compile.

Using Compass

  • Installing: Compass installation instructions
  • Compiling: switch to the UW Drupal Theme directory and run compass watch
    • For debugging purposes, you might want to specify the -s switch, which controls the output format. But, remember to compile compressed before committing the CSS.
  -s, --output-style STYLE         Select a CSS output mode.
                                       One of: nested, expanded, compact, compressed