FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
MontePy/.github/scripts/check_version.py at develop · idaholab/MontePy · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
idaholab
/
MontePy
Public
Notifications
You must be signed in to change notification settings
Fork
27
Star
66
Code
Issues
103
Pull requests
2
Discussions
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
MontePy
/
.github
/
scripts
/
check_version.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
24 lines (21 loc) · 557 Bytes
Breadcrumbs
MontePy
/
.github
/
scripts
/
check_version.py
Copy path
File metadata and controls
executable file
·
24 lines (21 loc) · 557 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env python
import
argparse
import
re
import
sys
from
setuptools_scm
import
get_version
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"-a"
,
"--alpha"
,
action
=
"store_true"
)
DEPLOY_VERSION
=
r"\d+\.\d+\.\d+"
ALPHA_VERSION
=
DEPLOY_VERSION
+
r"a\d+"
args
=
parser
.
parse_args
()
if
args
.
alpha
:
print
(
"checking alpha release"
)
parser
=
ALPHA_VERSION
else
:
print
(
"checking Final release."
)
parser
=
DEPLOY_VERSION
version
=
get_version
()
print
(
f"version =
{
version
}
"
)
if
not
re
.
fullmatch
(
parser
,
version
):
exit
(
1
)
exit
(
0
)
Back
|
FazBrowse Home
|
New Git URL