qrush / sub

a delicious way to organize programs
http://37signals.com/svn/posts/3264-automating-with-convention-introducing-sub
MIT License
1.74k stars 148 forks source link

selfupdate #21

Closed eins78 closed 6 years ago

eins78 commented 11 years ago

Maybe it would be nice to have a "update this sub" aka git-pull as a built-in feature?

qrush commented 11 years ago

We have this in 37 as 37-update, but its usage is pretty uncommon:

#!/usr/bin/env bash
# Usage: 37 update
# Summary: Pulls the latest changes from GitHub.
set -e

37git() {
  GIT_DIR="$_37_ROOT/.git" git "$@"
}

echo "Updating 37!"

37git fetch
37git reset --hard origin/master

I didn't know if it was important or not to bring this kind of script into the main sub repo. If there's clamoring for it we could consider it.

jeremy commented 6 years ago

In practice we're using packaging systems (homebrew, debs, etc) rather than git.