Skip to content
This repository was archived by the owner on Jun 27, 2022. It is now read-only.

Commit c5017af

Browse files
committed
Rebuild cache to include customizations
1 parent 47d444c commit c5017af

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.github/workflows/build-bundles.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,20 +44,27 @@ jobs:
4444
CODEQL_BUNDLE: ${{ matrix.bundle }}
4545
GITHUB_TOKEN: ${{ github.token }}
4646
run: |
47-
gh release --repo github/codeql-action download -p codeql-bundle.tar.gz ${CODEQL_BUNDLE}
47+
gh release --repo github/codeql-action download -p codeql-bundle.tar.gz $CODEQL_BUNDLE
4848
4949
tar xf codeql-bundle.tar.gz
5050
rm codeql-bundle.tar.gz
5151
52-
for lang in customizations/*; do
53-
mkdir codeql/qlpacks/codeql-$(basename $lang)-lib/customizations
54-
cp $lang/*.qll codeql/qlpacks/codeql-$(basename $lang)-lib/customizations
52+
for lang_path in customizations/*; do
53+
# Copy custom modules
54+
lang=${lang_path##*/}
55+
mkdir codeql/qlpacks/codeql-$lang-lib/customizations
56+
cp $lang_path/*.qll codeql/qlpacks/codeql-$lang-lib/customizations
5557
56-
for module in $lang/*.qll; do
57-
module_file=${module##*/}
58+
# Import custom modules
59+
for module_path in $lang_path/*.qll; do
60+
module_file=${module_path##*/}
5861
module_name=${module_file%.*}
59-
echo "import customizations.$module_name" >> codeql/qlpacks/codeql-$(basename $lang)-lib/Customizations.qll
62+
echo "import customizations.$module_name" >> codeql/qlpacks/codeql-$lang-lib/Customizations.qll
6063
done
64+
65+
# Rebuild cache
66+
rm -r codeql/qlpacks/codeql-$lang/.cache
67+
codeql/codeql query compile --search-path codeql --threads 0 codeql/qlpacks/codeql-$lang
6168
done
6269
6370
tar -czf codeql-bundle.tar.gz codeql

0 commit comments

Comments
 (0)