Skip to content

Commit ea9886a

Browse files
author
Dilawar Singh
committed
read version from VERSION file in source.
1 parent 3a8fe1b commit ea9886a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

moose-core/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ endif( )
4242
add_definitions( -DVERSION_MOOSE="${VERSION_MOOSE}")
4343

4444
# Write VERSION to a file VERSION so that setup.py can use it.
45-
message(STATUS "+ Writing ${VERSION_MOOSE} to ${VERSION_FILE}" )
45+
set(VERSION_FILE "${CMAKE_CURRENT_SOURCE_DIR}")
46+
message(STATUS "Writing ${VERSION_MOOSE} to ${VERSION_FILE}" )
4647
file(WRITE ${VERSION_FILE} ${VERSION_MOOSE} )
4748

4849
# This snippet is from LLVM project.

moose-core/python/setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424

2525
script_dir = os.path.dirname( os.path.abspath( __file__ ) )
2626

27-
version = '3.1.2'
27+
version = '3.1.3'
28+
if os.path.exists( os.path.join( script_dir, '..', 'VERSION' ) ):
29+
with open(os.path.join( script_dir, '..', 'VERSION' ) ) as f:
30+
version = f.read( )
2831

2932
try:
3033
import importlib.machinery

0 commit comments

Comments
 (0)