Ruby: fix prefix in create-extractor-pack scripts

This commit is contained in:
Harry Maclean
2023-03-14 13:14:25 +13:00
parent f19e48d473
commit 7ee7a0df34
3 changed files with 17 additions and 18 deletions

View File

@@ -116,21 +116,21 @@ jobs:
key: ruby-build
- name: Build Query Pack
run: |
rm -rf target/packs
codeql pack create ../misc/suite-helpers --output target/packs
codeql pack create ../shared/regex --output target/packs
codeql pack create ../shared/ssa --output target/packs
codeql pack create ../shared/tutorial --output target/packs
codeql pack create ql/lib --output target/packs
codeql pack create -j0 ql/src --output target/packs --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
PACK_FOLDER=$(readlink -f target/packs/codeql/ruby-queries/*)
rm -rf query-packs
codeql pack create ../misc/suite-helpers --output query-packs
codeql pack create ../shared/regex --output query-packs
codeql pack create ../shared/ssa --output query-packs
codeql pack create ../shared/tutorial --output query-packs
codeql pack create ql/lib --output query-packs
codeql pack create -j0 ql/src --output query-packs --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
PACK_FOLDER=$(readlink -f query-packs/codeql/ruby-queries/*)
codeql generate query-help --format=sarifv2.1.0 --output="${PACK_FOLDER}/rules.sarif" ql/src
(cd ql/src; find queries \( -name '*.qhelp' -o -name '*.rb' -o -name '*.erb' \) -exec bash -c 'mkdir -p "'"${PACK_FOLDER}"'/$(dirname "{}")"' \; -exec cp "{}" "${PACK_FOLDER}/{}" \;)
- uses: actions/upload-artifact@v3
with:
name: codeql-ruby-queries
path: |
ruby/extractor/target/packs/*
ruby/query-packs/*
retention-days: 1
package: