Skip to content

Commit

Permalink
New build versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Nov 29, 2014
1 parent 75f1aa8 commit 441f4bc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
6 changes: 4 additions & 2 deletions conda.recipe/bld.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@echo off

SET BLD_DIR=%CD%
cd /D "%RECIPE_DIR%\.."

"%PYTHON%" setup.py install
FOR /F "delims=" %%i IN ('git describe --tags') DO set BLAZE_VERSION=%%i
echo.%BLAZE_VERSION% | %PYTHON% .\conda.recipe\version.py > %SRC_DIR%\__conda_version__.txt
%PYTHON% setup.py --quiet install
5 changes: 2 additions & 3 deletions conda.recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ SRC_DIR=$RECIPE_DIR/..
pushd $SRC_DIR

# X.X.X.dev builds
version=`git describe --tags`
u_version=`echo $version | tr "-" _`
u_version=`git describe --tags | $PYTHON $SRC_DIR/conda.recipe/version.py`

echo $u_version> __conda_version__.txt
echo $u_version > __conda_version__.txt

cp __conda_version__.txt $BLD_DIR

Expand Down
13 changes: 13 additions & 0 deletions conda.recipe/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
def main():
inp = sys.stdin.read().strip().split('-')
try:
inp[1] = 'post%03d' % int(inp[1])
except IndexError:
pass
print('.'.join(inp))
return 0


if __name__ == '__main__':
import sys
sys.exit(main())

0 comments on commit 441f4bc

Please sign in to comment.