-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from boutproject/v2.1.0
v2.1.0
- Loading branch information
Showing
24 changed files
with
496 additions
and
447 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "shared/BoutEquation"] | ||
path = shared/BoutEquation | ||
url = [email protected]:johnomotani/BoutEquation |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from pathlib import Path | ||
from string import ascii_uppercase | ||
|
||
try: | ||
from git import Repo | ||
except ImportError: | ||
# print a return code to stdout so we can capture and test it in the makefile | ||
print(11) | ||
raise | ||
|
||
scriptdir = Path(__file__).parent | ||
|
||
repo = Repo(scriptdir.parent) | ||
|
||
diff = repo.git.diff() | ||
|
||
# Find a string to use for the delimiter | ||
delimiter = "_STORM_DIFF_" | ||
for letter in ascii_uppercase: | ||
if ")" + delimiter not in diff: | ||
delimiter_success = True | ||
break | ||
delimiter = "_STORM_DIFF_" + letter + "_" | ||
if ")" + delimiter in diff: | ||
# print a return code to stdout so we can capture and test it in the makefile | ||
print(12) | ||
raise ValueError( | ||
"save_git_version.py failed to find a delimiter that is not in the git diff" | ||
) | ||
|
||
with open("storm_version.hxx", "w") as f: | ||
f.write("constexpr auto storm_git_hash = \"") | ||
f.write(repo.git.describe(abbrev=40, dirty=True, always=True, tags=True)) | ||
f.write("\";\n") | ||
f.write("constexpr auto storm_git_diff = R\"" + delimiter + "(") | ||
f.write(diff) | ||
f.write(")" + delimiter + "\";\n") | ||
|
||
# print a return code to stdout so we can capture and test it in the makefile | ||
print(0) |
Submodule BoutEquation
added at
e29baa
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
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
Oops, something went wrong.