| # Copyright 2010 The Go Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style |
| # license that can be found in the LICENSE file. |
| # Check that we can use 'hg' |
| if ! hg version > /dev/null 2>&1; then |
| echo 'hg not installed' 1>&2 |
| VERSION=$(hg identify -n 2>/dev/null) |
| TAG=$(hg identify -t | sed 's!/release!!') |
| OLD=$(hg identify | sed 1q) |
| VERSION=$(echo $OLD | awk '{print $1}') |
| TAG=$(echo $OLD | awk '{print $2}' | sed 's!/release!!') |
| # Append tag if not 'tip' |
| if [[ "$TAG" != "tip" ]]; then |