Created
June 24, 2018 14:09
-
-
Save jojonki/94adfc293e08528e94b8fbec56370683 to your computer and use it in GitHub Desktop.
Get a current Git revision in python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
rev = subprocess.check_output(['git', 'describe', '--always']).strip().decode('utf-8') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment