Correct me if I'm wrong but doesn't a git clone involve downloading the project's entire git history as well as $CURRENT_VERSION? That seems a little excessive.
You can do a low depth to minimize that if you want (--depth=1 or something like that if I remember correctly). You could just rm -rf the root .git directory after but that is a download bloat issue.
That said this should work:
git clone --depth=1 --branch=master git://myrepo && rm -rf myrepo/.git`
but.. yeah. Not really great. git clone --depth=1
will get you just $CURRENT_VERSIONWhat is so cumbersome about downloading a project's history?