Commit 18c067b
committed
Make the synced repository configurable
The reusable `submodules-sync` workflow assumed its `dev-tools`
submodule is a direct submodule of the repository whose submodules
should be synced, and always acted on the repo one level up
(`cd "$(git rev-parse --show-toplevel)/.."`).
That breaks when `dev-tools` is nested more than one level deep — e.g.
when a repository vendors another repository (which itself carries
`dev-tools`) as a submodule. In that case the workflow enumerates and
syncs the *inner* repository's submodules instead of the caller's.
Add an optional `submodule_sync_root` input, piped through to
`per-submodule-build-matrix.sh` as `SUBMODULE_SYNC_ROOT`, naming the
repository directory to act on relative to the checkout root. When it
is unset the workflow keeps its previous behavior, so existing callers
are unaffected; a caller whose `dev-tools` is nested can pass e.g. "."
to sync its own top-level submodules.1 parent 9e5e864 commit 18c067b
2 files changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
10 | 17 | | |
11 | 18 | | |
12 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
| 49 | + | |
39 | 50 | | |
40 | 51 | | |
41 | 52 | | |
| |||
0 commit comments