diff --git a/Makefile b/Makefile index be369f5..219f6e0 100644 --- a/Makefile +++ b/Makefile @@ -88,3 +88,9 @@ dist: clean ## builds source and wheel package install: clean ## install the package to the active Python's site-packages python setup.py install + +setcommit: + bash set_commit_id.sh +# commit=`git log -1 --pretty=format:%h` +# sed -i.bak -E "s|COMMIT_ID = \".+\"|COMMIT_ID = \"$(commit)\"|g" erepublik/utils.py +# mv erepublik/utils.py.bak erepublik/utils.py diff --git a/set_commit_id.sh b/set_commit_id.sh new file mode 100755 index 0000000..c2102a4 --- /dev/null +++ b/set_commit_id.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +commit=$(git log -1 --pretty=format:%h) +sed -i.bak -E "s|COMMIT_ID = \".+\"|COMMIT_ID = \"${commit}\"|g" erepublik/utils.py +rm erepublik/utils.py.bak