Files
codeql/scripts/install-deps.sh
Andrew Eisenberg 49d239f4bf Push upgrades pack into lib pack
PR Related to https://github.com/github/semmle-code/pull/40918
Removes the upgrades pack and uses ql/lib/upgrades instead.

Also, fix malformed parameter in instruction.

Co-authored-by: Chris Smowton <smowton@github.com>
2022-01-04 11:32:52 -08:00

23 lines
647 B
Bash
Executable File

#!/bin/bash
# Installs any necessary QL pack dependencies from the package registry.
# The optional argument must be a valid value for the `--mode` option to `codeql pack install`
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
GO_ROOT=$(dirname "$SCRIPT_DIR")
if [ $# -eq 0 ]; then
LOCK_MODE="use-lock"
elif [ $# -eq 1 ]; then
LOCK_MODE=$1
else
echo "Usage: install-deps.sh [<lock-mode>]"
echo " lock-mode: One of 'use-lock' (default), 'verify', 'update', or 'no-lock'"
exit 1
fi
for d in ql/lib ql/src ql/test ql/examples
do
codeql pack install --mode ${LOCK_MODE} "${GO_ROOT}/${d}"
done