forked from Azure/azureml-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docs.py
36 lines (29 loc) · 782 Bytes
/
docs.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# imports
import os
import json
import glob
import argparse
from git import Repo
# define functions
def main(args):
# get list of scripts
scripts = sorted(glob.glob("*.sh", recursive=False))
# get list of changes files
repo = Repo(search_parent_directories=True)
changed_files = [
f.a_path for f in repo.index.diff("origin/main") if "cli/" in f.a_path
]
print(changed_files)
# run functions
if __name__ == "__main__":
# issue #146
if "posix" not in os.name:
print(
"windows is not supported, see issue #146 (https://github.com/Azure/azureml-examples/issues/146)"
)
exit(1)
# setup argparse
parser = argparse.ArgumentParser()
args = parser.parse_args()
# call main
main(args)