File tree Expand file tree Collapse file tree 5 files changed +18
-7
lines changed
Expand file tree Collapse file tree 5 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -5,4 +5,5 @@ FROM mcr.microsoft.com/vscode/devcontainers/cpp:0-ubuntu-22.04
55
66USER root
77ADD root.sh /tmp/root.sh
8+ ADD update-codeql.sh /usr/local/bin/update-codeql
89RUN bash /tmp/root.sh && rm /tmp/root.sh
Original file line number Diff line number Diff line change @@ -17,3 +17,6 @@ curl -fSsL -o /usr/local/bin/bazelisk https://github.com/bazelbuild/bazelisk/rel
1717echo " ${BAZELISK_DOWNLOAD_SHA} */usr/local/bin/bazelisk" | sha256sum --check -
1818chmod 0755 /usr/local/bin/bazelisk
1919ln -s bazelisk /usr/local/bin/bazel
20+
21+ # install latest codeql
22+ update-codeql
Original file line number Diff line number Diff line change 1+ #! /bin/bash -e
2+
3+ URL=https://github.com/github/codeql-cli-binaries/releases
4+ LATEST_VERSION=$( curl -L -s -H ' Accept: application/json' $URL /latest | sed -e ' s/.*"tag_name":"\([^"]*\)".*/\1/' )
5+ CURRENT_VERSION=v$( codeql version 2> /dev/null | sed -ne ' s/.*release \([0-9.]*\)\./\1/p' )
6+ if [[ $CURRENT_VERSION != $LATEST_VERSION ]]; then
7+ curl -fSqL -o /tmp/codeql.zip $URL /download/$LATEST_VERSION /codeql-linux64.zip
8+ unzip /tmp/codeql.zip -qd /opt
9+ rm /tmp/codeql.zip
10+ ln -sf /opt/codeql/codeql /usr/local/bin/codeql
11+ echo installed version $LATEST_VERSION
12+ else
13+ echo current version $CURRENT_VERSION is up-to-date
14+ fi
Original file line number Diff line number Diff line change @@ -11,5 +11,3 @@ bazel run swift/create-extractor-pack
1111# install and set up pre-commit
1212python3 -m pip install pre-commit --no-warn-script-location
1313$HOME /.local/bin/pre-commit install
14-
15- cat $( dirname $0 ) /user_bashrc.sh >> $HOME /.bashrc
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments