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: scripts/README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,23 +19,15 @@ scripts/
19
19
20
20
### Deploying Changes
21
21
22
-
Due to the devcontainer CLI's packaging behavior (each feature is packaged independently), the helper must be deployed to each feature's directory. We maintain this through a sync script:
22
+
Due to the devcontainer CLI's packaging behavior (each feature is packaged independently), the helper must be present in each feature's directory at packaging time. This is handled automatically by CI — all workflows run `scripts/sync-common-setup.sh` after checkout and before packaging.
23
23
24
-
```bash
25
-
./scripts/sync-common-setup.sh
26
-
```
27
-
28
-
This copies `scripts/lib/common-setup.sh` to all features:
29
-
-`src/anaconda/common-setup.sh`
30
-
-`src/docker-in-docker/common-setup.sh`
31
-
- etc.
24
+
The copies are `.gitignore`d — only the source file is tracked in git.
32
25
33
26
### Workflow
34
27
35
28
1.**Edit**: Make changes to `scripts/lib/common-setup.sh`
36
29
2.**Test**: Run `bash test/_global/test-common-setup.sh` to verify
37
-
3.**Sync**: Run `./scripts/sync-common-setup.sh` to deploy to all features
38
-
4.**Commit**: Commit both the source and all copies together
30
+
3.**Commit**: Only the source file needs to be committed
39
31
40
32
### Why Copies?
41
33
@@ -48,12 +40,20 @@ Therefore, each feature needs its own copy of the helper to ensure it's availabl
48
40
49
41
## Testing
50
42
51
-
Tests are located in `test/_global/` and reference the source of truth directly:
43
+
Tests are located in `test/_global/` and source from the canonical `scripts/lib/common-setup.sh`:
52
44
53
45
```bash
54
46
bash test/_global/test-common-setup.sh
55
47
```
56
48
49
+
### Local Development
50
+
51
+
To generate the copies locally (e.g., for testing features outside CI):
52
+
53
+
```bash
54
+
./scripts/sync-common-setup.sh
55
+
```
56
+
57
57
## Future
58
58
59
59
This approach is a workaround for the current limitation. The devcontainer spec has a proposal for an `include` property in `devcontainer-feature.json` that would allow native code sharing (see [devcontainers/spec#129](https://github.com/devcontainers/spec/issues/129)). Once implemented, this sync mechanism can be removed.
0 commit comments