Skip to content

Commit 13f5c02

Browse files
authored
fix bazel version selection (#16)
1 parent bc22e71 commit 13f5c02

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
// Installs latest version from the Distribution
1818
"installZsh": "false",
1919
"username": "vscode",
20-
"userUid": "1000",
21-
"userGid": "1000",
20+
"userUid": "1000",
21+
"userGid": "1000",
2222
"upgradePackages": "false" // WARNING: do *not* enable; this would include packages also from other features, which may have been pinned to a specific version
2323
},
2424
"ghcr.io/devcontainers-community/features/llvm": {
@@ -30,7 +30,7 @@
3030
"version": "3.12.11"
3131
},
3232
"./s-core-local": {
33-
"BAZEL_VERSION": "7.5.0",
33+
"BAZEL_VERSION": "8.3.0",
3434
"BUILDIFIER_VERSION": "8.2.1",
3535
// The following sha256sum is for the binary buildifier-linux-amd64
3636
// from the GitHub release page of buildtools

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131
}
3232
},
3333
"onCreateCommand": "/devcontainer/features/s-core-local/on_create_command.sh",
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",
34+
// The repos in S-CORE may use different Bazel versions. This ensures that the required version is installed.
35+
// Should be removed once we provide versions of the devcontainer.
36+
"postCreateCommand": "if [ -f .bazelversion ] && [ \"$(cat .bazelversion)\" != \"$(dpkg --list | grep 'ii bazel ' | awk '{print $3}')\" ]; then sudo apt-get update && sudo apt-get install -y --allow-downgrades bazel=$(cat .bazelversion); fi",
3637
"mounts": [
3738
{
3839
"source": "${localEnv:HOME}/.cache/bazel", // default Bazel cache directory

0 commit comments

Comments
 (0)