We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cde8f56 commit 1985464Copy full SHA for 1985464
niworkflows/_version.py
@@ -628,8 +628,22 @@ def get_versions():
628
except NotThisMethod:
629
pass
630
631
+ root = os.path.realpath(__file__)
632
+
633
+ root_dir = os.path.dirname(root)
634
+ if os.path.isfile(os.path.join(root_dir, 'VERSION')):
635
+ with open(os.path.join(root_dir, 'VERSION')) as vfile:
636
+ version = vfile.readline().strip()
637
638
+ return {
639
+ "version": version,
640
+ "full-revisionid": None,
641
+ "dirty": None,
642
+ "error": None,
643
+ "date": None
644
+ }
645
646
try:
- root = os.path.realpath(__file__)
647
# versionfile_source is the relative path from the top of the source
648
# tree (where the .git directory might live) to this file. Invert
649
# this to find the root from __file__.
0 commit comments