-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdevgetchanges.py
More file actions
89 lines (77 loc) · 4.31 KB
/
devgetchanges.py
File metadata and controls
89 lines (77 loc) · 4.31 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import os
import shutil
os.chdir(os.path.expanduser("~"))
# Define base paths
src_base = os.path.join("Documents", "workspace", "microting", "eform-angular-frontend")
dst_base = os.path.join("Documents", "workspace", "microting", "eform-backendconfiguration-plugin")
# Paths to remove and copy
paths = [
(os.path.join("eform-client", "src", "app", "plugins", "modules", "backend-configuration-pn"),
os.path.join("eform-client", "src", "app", "plugins", "modules", "backend-configuration-pn")),
(os.path.join("eFormAPI", "Plugins", "BackendConfiguration.Pn"),
os.path.join("eFormAPI", "Plugins", "BackendConfiguration.Pn")),
]
for dst_rel_path, src_rel_path in paths:
dst_path = os.path.join(dst_base, dst_rel_path)
src_path = os.path.join(src_base, src_rel_path)
if os.path.exists(dst_path):
shutil.rmtree(dst_path)
shutil.copytree(src_path, dst_path)
# Test files to remove
test_files_to_remove = [
os.path.join("eform-client", "e2e", "Tests", "backend-configuration-settings"),
os.path.join("eform-client", "e2e", "Tests", "backend-configuration-general"),
os.path.join("eform-client", "wdio-headless-plugin-step2.conf.ts"),
os.path.join("eform-client", "e2e", "Page objects", "BackendConfiguration"),
os.path.join("eform-client", "cypress", "e2e", "plugins", "backend-configuration-pn"),
]
for rel_path in test_files_to_remove:
full_path = os.path.join(dst_base, rel_path)
if os.path.exists(full_path):
if os.path.isdir(full_path):
shutil.rmtree(full_path)
else:
os.remove(full_path)
# Test files to copy
test_files_to_copy = [
(os.path.join("eform-client", "e2e", "Tests", "backend-configuration-settings"),
os.path.join("eform-client", "e2e", "Tests", "backend-configuration-settings")),
(os.path.join("eform-client", "e2e", "Tests", "backend-configuration-general"),
os.path.join("eform-client", "e2e", "Tests", "backend-configuration-general")),
(os.path.join("eform-client", "e2e", "Page objects", "BackendConfiguration"),
os.path.join("eform-client", "e2e", "Page objects", "BackendConfiguration")),
(os.path.join("eform-client", "cypress", "e2e", "plugins", "backend-configuration-pn"),
os.path.join("eform-client", "cypress", "e2e", "plugins", "backend-configuration-pn")),
(os.path.join("eform-client", "wdio-headless-plugin-step2a.conf.ts"),
os.path.join("eform-client", "wdio-headless-plugin-step2a.conf.ts")),
(os.path.join("eform-client", "wdio-headless-plugin-step2b.conf.ts"),
os.path.join("eform-client", "wdio-headless-plugin-step2b.conf.ts")),
(os.path.join("eform-client", "wdio-headless-plugin-step2c.conf.ts"),
os.path.join("eform-client", "wdio-headless-plugin-step2c.conf.ts")),
(os.path.join("eform-client", "wdio-headless-plugin-step2d.conf.ts"),
os.path.join("eform-client", "wdio-headless-plugin-step2d.conf.ts")),
(os.path.join("eform-client", "wdio-headless-plugin-step2e.conf.ts"),
os.path.join("eform-client", "wdio-headless-plugin-step2e.conf.ts")),
(os.path.join("eform-client", "wdio-headless-plugin-step2f.conf.ts"),
os.path.join("eform-client", "wdio-headless-plugin-step2f.conf.ts")),
(os.path.join("eform-client", "wdio-headless-plugin-step2g.conf.ts"),
os.path.join("eform-client", "wdio-headless-plugin-step2g.conf.ts")),
(os.path.join("eform-client", "wdio-headless-plugin-step2h.conf.ts"),
os.path.join("eform-client", "wdio-headless-plugin-step2h.conf.ts")),
(os.path.join("eform-client", "wdio-headless-plugin-step2i.conf.ts"),
os.path.join("eform-client", "wdio-headless-plugin-step2i.conf.ts")),
(os.path.join("eform-client", "wdio-headless-plugin-step2j.conf.ts"),
os.path.join("eform-client", "wdio-headless-plugin-step2j.conf.ts")),
(os.path.join("eform-client", "cypress", "fixtures"),
os.path.join("eform-client", "cypress", "fixtures")),
]
for src_rel_path, dst_rel_path in test_files_to_copy:
src_path = os.path.join(src_base, src_rel_path)
dst_path = os.path.join(dst_base, dst_rel_path)
if os.path.isdir(src_path):
shutil.copytree(src_path, dst_path)
else:
shutil.copy2(src_path, dst_path)
fixture_example_path = os.path.join(dst_base, "eform-client", "cypress", "fixtures", "example.json")
if os.path.exists(fixture_example_path):
os.remove(fixture_example_path)