Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Commit

Permalink
only auto-set GIT_VERSION if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
timcharper committed Dec 18, 2014
1 parent 493b4f3 commit 18a47c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.sh
@@ -1,5 +1,6 @@
#!/bin/bash -x

# Note - GIT_VERSION should not be prefixed with a `v`.
. env.sh

set -e -o pipefail
Expand Down
6 changes: 4 additions & 2 deletions build_package_test_and_bundle.sh
Expand Up @@ -7,8 +7,10 @@ set -e -o pipefail
# remove old installers
rm -f Disk\ Image/*.pkg

if [ "`uname`" == "Darwin" ]; then sed_regexp="-E"; else sed_regexp="-r"; fi
GIT_VERSION="${1:-`curl http://git-scm.com/ 2>&1 | grep '<span class="version">' -A 1 | tail -n 1 | sed $sed_regexp 's/ *//'`}"
if [ -z "$GIT_VERSION" ]; then
if [ "`uname`" == "Darwin" ]; then sed_regexp="-E"; else sed_regexp="-r"; fi
GIT_VERSION="${1:-`curl http://git-scm.com/ 2>&1 | grep '<span class="version">' -A 1 | tail -n 1 | sed $sed_regexp 's/ *//'`}"
fi

echo $GIT_VERSION
./build.sh $GIT_VERSION
Expand Down

0 comments on commit 18a47c6

Please sign in to comment.