Skip to content

Commit

Permalink
TOOLS-1268 build.sh leaves source unchanged on completion
Browse files Browse the repository at this point in the history
  • Loading branch information
zachjs committed Aug 9, 2016
1 parent f5dc5c5 commit 9a3003f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ fi
SCRIPT_DIR="$(cd "$(dirname ${BASH_SOURCE[0]})" && pwd)"
cd $SCRIPT_DIR

sed -i.bak "s/built-without-version-string/$(git describe)/" common/options/options.go
sed -i.bak "s/built-without-git-spec/$(git rev-parse HEAD)/" common/options/options.go
sed -i.bak -e "s/built-without-version-string/$(git describe)/" \
-e "s/built-without-git-spec/$(git rev-parse HEAD)/" \
common/options/options.go

# remove stale packages
rm -rf vendor/pkg
Expand All @@ -24,3 +25,5 @@ for i in bsondump mongostat mongofiles mongoexport mongoimport mongorestore mong
go build -o "bin/$i" -tags "$tags" "$i/main/$i.go"
./bin/$i --version
done

mv -f common/options/options.go.bak common/options/options.go

0 comments on commit 9a3003f

Please sign in to comment.