提交 fd289d1a authored 作者: James Bergstra's avatar James Bergstra

tweak to hg_version_hook to do nothing when no HG_NODE is given

上级 07c78fa6
#!/bin/sh
# Script to update version.py in response to Mercurial hooks. This should
# not appear in a release tarball.
sed -e "s/^hg_revision.*/hg_revision = '`expr substr $HG_NODE 1 12`'/" theano/version.py >theano/version.py.out && mv theano/version.py.out theano/version.py
if [ -z "$HG_NODE" ] ; then
echo No HG_NODE, skipping update of theano.__version__
exit 0 # this seems to be normal sometimes
else
sed -e "s/^hg_revision.*/hg_revision = '`expr substr $HG_NODE 1 12`'/" theano/version.py >theano/version.py.out && mv theano/version.py.out theano/version.py
fi
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论