|
15 | 15 | import shutil |
16 | 16 | import sys |
17 | 17 |
|
18 | | -keep_files = {'highlight_test_lexer.py', 'conf.py', 'make.bat', 'Makefile'} |
19 | | -for item in os.listdir('../docs'): |
20 | | - if item not in keep_files: |
21 | | - path = os.path.join('../docs', item) |
22 | | - try: |
23 | | - if os.path.isfile(path): |
24 | | - os.remove(path) |
25 | | - elif os.path.isdir(path): |
26 | | - shutil.rmtree(path) |
27 | | - except Exception as e: |
28 | | - print(f"Error deleting {item}: {e}") |
29 | | - |
30 | | -build_version = os.environ.get('CURRENT_VERSION', 'v2') |
31 | | -if build_version == 'v2': |
32 | | - shutil.copytree( |
33 | | - os.path.join(os.path.dirname(__file__), ''), |
34 | | - os.path.join(os.path.dirname(__file__)), |
35 | | - dirs_exist_ok=True |
36 | | - ) |
37 | | -else: |
38 | | - shutil.copytree( |
39 | | - os.path.join(os.path.dirname(__file__), '../docs_state'), |
40 | | - os.path.join(os.path.dirname(__file__)), |
41 | | - dirs_exist_ok=True |
42 | | - ) |
| 18 | +# keep_files = {'highlight_test_lexer.py', 'conf.py', 'make.bat', 'Makefile'} |
| 19 | +# for item in os.listdir('../docs'): |
| 20 | +# if item not in keep_files: |
| 21 | +# path = os.path.join('../docs', item) |
| 22 | +# try: |
| 23 | +# if os.path.isfile(path): |
| 24 | +# os.remove(path) |
| 25 | +# elif os.path.isdir(path): |
| 26 | +# shutil.rmtree(path) |
| 27 | +# except Exception as e: |
| 28 | +# print(f"Error deleting {item}: {e}") |
| 29 | +# |
| 30 | +# build_version = os.environ.get('CURRENT_VERSION', 'v2') |
| 31 | +# if build_version == 'v2': |
| 32 | +# shutil.copytree( |
| 33 | +# os.path.join(os.path.dirname(__file__), ''), |
| 34 | +# os.path.join(os.path.dirname(__file__)), |
| 35 | +# dirs_exist_ok=True |
| 36 | +# ) |
| 37 | +# else: |
| 38 | +# shutil.copytree( |
| 39 | +# os.path.join(os.path.dirname(__file__), '../docs_state'), |
| 40 | +# os.path.join(os.path.dirname(__file__)), |
| 41 | +# dirs_exist_ok=True |
| 42 | +# ) |
43 | 43 |
|
44 | 44 | sys.path.insert(0, os.path.abspath('../docs/')) |
45 | 45 | sys.path.insert(0, os.path.abspath('../')) |
|
0 commit comments