We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b45c846 commit a810682Copy full SHA for a810682
scripts/update_codeql_dependency.sh
@@ -0,0 +1,18 @@
1
+#!/usr/bin/env bash
2
+
3
+# If there aren't two arguments, print usage and exit.
4
+if [[ -z $2 ]];
5
+then
6
+ echo "Usage: bump_version.sh <dependency> <new_version>"
7
+ exit
8
+fi
9
10
+echo "Updating CodeQL dependency $1 to $2."
11
12
+# update the qlpacks
13
+find . -name 'qlpack.yml' | grep -v './codeql_modules' | grep -v './scripts' | xargs sed -i -r "s#${1}: [^\s]+#${1}: ${2}#"
14
15
+# update the lock files
16
+find . -name 'codeql-pack.lock.yml' | grep -v './codeql_modules' | grep -v './scripts' | xargs sed -i -r -z "s#${1}:\n(\s*)version: [^\s]+\n#${1}:\n\1version: ${2}\n#"
17
18
+echo "Done."
0 commit comments