Skip to content

Commit

Permalink
Make the conda build script accept -pre versions
Browse files Browse the repository at this point in the history
v2.2-pre-9-g4b06d36 -> 2.2.pre.9
  • Loading branch information
remram44 committed Apr 10, 2015
1 parent 4b06d36 commit c6ba1f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/dist/conda/conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ if [ -z "$1" ]; then
exit 1
fi
if [ -z "$2" ]; then
# describe gives us either "v2.1.4" or "v2.1.4-40-g1234567"
# describe gives us something like:
# "v2.1.4", "v2.1.4-40-g1234567", "v2.2-pre-g1234567", "v2.2.0-rc1", "v2.2-rc2-g1234567"
# note: no 'sed -r' on OS X
VERSION="$(git describe --always --tags | sed 's/^v//' | sed 's/^\([0-9.]*\)-\([0-9]*\)-g\([a-z0-9]*\)$/\1.\2/')"
VERSION="$(git describe --always --tags | sed 's/^v//' | sed 's/-g\([a-z0-9]*\)$//' | sed 's/-/./g')"
else
VERSION="$2"
fi
Expand Down

0 comments on commit c6ba1f3

Please sign in to comment.