Skip to content

Commit 3297323

Browse files
authored
Install bazel version required by the repo (#12)
1 parent 95699f3 commit 3297323

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/s-core-devcontainer/.devcontainer/s-core-local/devcontainer-feature.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,13 @@
3131
}
3232
},
3333
"onCreateCommand": "/devcontainer/features/s-core-local/on_create_command.sh",
34-
"mounts": [ {
34+
// The repos in S-CORE may use different Bazel versions. This ensures that the required version is installed
35+
"postCreateCommand": "if [ -f .bazelversion ]; then sudo apt update && sudo apt install bazel-$(cat .bazelversion); fi",
36+
"mounts": [
37+
{
3538
"source": "${localEnv:HOME}/.cache/bazel", // default Bazel cache directory
3639
"target": "/var/cache/bazel",
3740
"type": "bind"
3841
}
39-
]
42+
]
4043
}

0 commit comments

Comments
 (0)