Skip to content

Commit c8bfb4e

Browse files
committed
feat(scripts): Update the publish script
1 parent 22d04e0 commit c8bfb4e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/publish-extractor-pack.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ EXTRACTOR_VERSION=$(grep version $EXTRACTOR_INFO | awk '{print $2}')
88

99
LATEST_RELEASE=$(gh release list | head -n 1 | awk '{print $1}' | sed 's/v//')
1010

11+
if which codeql >/dev/null; then
12+
CODEQL_BINARY="codeql"
13+
elif gh codeql >/dev/null; then
14+
CODEQL_BINARY="gh codeql"
15+
else
16+
gh extension install github/gh-codeql
17+
CODEQL_BINARY="gh codeql"
18+
fi
19+
1120
echo "[+] ${EXTRACTOR_NAME} (${EXTRACTOR_VERSION})"
1221
echo "[+] Last release: ${LATEST_RELEASE}"
1322

@@ -20,8 +29,9 @@ if [ "$LATEST_RELEASE" != "$EXTRACTOR_VERSION" ]; then
2029
exit 1
2130
fi
2231

23-
# echo "[+] Add queries to extractor-pack"
24-
# $CODEQL_BINARY pack create --output=./extractor-pack/queries ./ql/src
32+
echo "[+] Add queries to extractor-pack"
33+
$CODEQL_BINARY pack create --output=./extractor-pack/qlpacks ./ql/lib
34+
$CODEQL_BINARY pack create --output=./extractor-pack/qlpacks ./ql/src
2535

2636
# bundle extractor
2737
tar czf extractor-$EXTRACTOR_NAME.tar.gz extractor-pack

0 commit comments

Comments
 (0)