Skip to content

Commit 8392e77

Browse files
committed
update versions and readme
1 parent a7fd6a0 commit 8392e77

5 files changed

Lines changed: 24 additions & 8 deletions

File tree

.github/workflows/publish.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,18 @@ jobs:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737
- name: Generate manifest
3838
run: |
39-
version() { grep '^version:' "$1" | cut -d' ' -f2; }
39+
version() { grep -m1 '^version: ' "$1" | cut -d' ' -f2; }
40+
cpp_all="$(version cpp/lib/qlpack.yml)"
41+
cpp_queries="$(version cpp/src/qlpack.yml)"
42+
go_queries="$(version go/src/qlpack.yml)"
43+
java_queries="$(version java/src/qlpack.yml)"
4044
cat > manifest.json <<EOF
4145
{
4246
"packs": [
43-
{"name": "trailofbits/cpp-all", "version": "$(version cpp/lib/qlpack.yml)", "registry": "ghcr.io"},
44-
{"name": "trailofbits/cpp-queries", "version": "$(version cpp/src/qlpack.yml)", "registry": "ghcr.io"},
45-
{"name": "trailofbits/go-queries", "version": "$(version go/src/qlpack.yml)", "registry": "ghcr.io"},
46-
{"name": "trailofbits/java-queries", "version": "$(version java/src/qlpack.yml)", "registry": "ghcr.io"}
47+
{"name": "trailofbits/cpp-all", "version": "$cpp_all", "registry": "ghcr.io"},
48+
{"name": "trailofbits/cpp-queries", "version": "$cpp_queries", "registry": "ghcr.io"},
49+
{"name": "trailofbits/go-queries", "version": "$go_queries", "registry": "ghcr.io"},
50+
{"name": "trailofbits/java-queries", "version": "$java_queries", "registry": "ghcr.io"}
4751
]
4852
}
4953
EOF

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ make generate-table generate-help
5757
## Release
5858

5959
1. Ensure all `qlpack.yml` files have the correct version.
60+
6061
```shell
6162
./scripts/update-version.sh <version>
6263
```
63-
1. Create a release on GitHub, create a new tag, and autogenerate release notes.
6464

65+
1. Create a release on GitHub, create a new tag, and autogenerate release notes.

go/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: trailofbits/go-queries
33
description: CodeQL queries for Go developed by Trail of Bits
44
authors: Trail of Bits
5-
version: 0.2.1
5+
version: 0.3.0
66
license: AGPL
77
library: false
88
extractor: go

java/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: trailofbits/java-queries
33
description: CodeQL queries for Java developed by Trail of Bits
44
authors: Trail of Bits
5-
version: 0.0.1
5+
version: 0.3.0
66
license: AGPL
77
library: false
88
extractor: java-kotlin

scripts/update-version.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ packs=(
2121
java/src/qlpack.yml
2222
)
2323

24+
for f in "${packs[@]}"; do
25+
if [[ ! -f "$f" ]]; then
26+
echo "Error: file not found: $f (run from repo root)" >&2
27+
exit 1
28+
fi
29+
if ! grep -q '^version: ' "$f"; then
30+
echo "Error: no 'version:' line in $f" >&2
31+
exit 1
32+
fi
33+
done
34+
2435
for f in "${packs[@]}"; do
2536
tmp="$(mktemp)"
2637
sed "s/^version: .*/version: $version/" "$f" >"$tmp"

0 commit comments

Comments
 (0)