Skip to content

Commit

Permalink
reset by uploading a new bare repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Zoschke committed Mar 23, 2012
1 parent e3c35f2 commit 34bc74a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/heroku/command/repo.rb
Expand Up @@ -54,6 +54,21 @@ def download
system("curl -o #{app}-repo.tgz '#{repo_get_url}'")
end

# repo:reset
#
# Reset the repo and cache
def reset
run <<EOF
set -e
mkdir -p repo_tmp/unpack
cd repo_tmp/unpack
git init --bare .
tar -zcf ../repack.tgz .
curl -o /dev/null --upload-file ../repack.tgz '#{repo_put_url}'
exit
EOF
end

private

def release
Expand Down

0 comments on commit 34bc74a

Please sign in to comment.