You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,8 @@ The repository ships the sync workflow template used by generated package reposi
114
114
115
115
The generated `source-sync` workflow stays thin: it checks out this repository as the generator logic, reads the consumer repo's `.msra` source tree, generates the artifact into a staging tree, syncs the generated tree into `main`, validates the result, and pushes the commit so the target repo's `publish.yml` can run on `push` to `main`.
116
116
117
+
If a project defines `[app.sync].preserved_target_paths` in its MSRA source, the generated sync step preserves those repo-specific runtime artifacts. For the FixPrice layout that means `tests/__snapshots__` stays in `main` and is not rewritten by the generator.
118
+
117
119
Before validation, the generated workflow installs the target project's `requirements-dev.txt` so the validation step runs with the generated dependencies available.
118
120
119
121
The source and target branches come from the repo-specific sync config, so the generated workflow itself stays thin.
Copy file name to clipboardExpand all lines: docs/msra-repo-b-sync.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
- этот workflow запускается вручную через `workflow_dispatch`
9
9
- внутри job он сам checkout-ит repo с логикой генератора
10
10
- затем читает `repo B/source`, генерирует артефакт и пушит его в `repo B/main`
11
+
- при синке сохраняет repo-specific runtime artifacts, перечисленные в `[app.sync].preserved_target_paths` source-MSTRA, например `tests/__snapshots__`
11
12
- после `push` в `main` автоматически стартует `publish.yml`
12
13
13
14
## Почему workflow должен лежать в `main`
@@ -113,6 +114,19 @@ jobs:
113
114
114
115
target = Path("target")
115
116
generated = Path("generated")
117
+
preserved_root = Path("preserved")
118
+
preserve_paths = ["tests/__snapshots__"]
119
+
120
+
for relative_path in preserve_paths:
121
+
source_path = target / relative_path
122
+
if not source_path.exists():
123
+
raise RuntimeError(f'Preserved target path "{relative_path}" does not exist.')
0 commit comments