Skip to content

Commit 4b98e9f

Browse files
Fix shellcheck findings and add CodeQL workflow
1 parent 0069c94 commit 4b98e9f

2 files changed

Lines changed: 47 additions & 3 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- beta
8+
pull_request:
9+
branches:
10+
- main
11+
- beta
12+
schedule:
13+
- cron: '17 6 * * 1'
14+
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
concurrency:
21+
group: folderview-plus-codeql-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
analyze:
26+
name: Analyze (JavaScript)
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v3
35+
with:
36+
languages: javascript
37+
queries: security-extended,security-and-quality
38+
39+
- name: Autobuild
40+
uses: github/codeql-action/autobuild@v3
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@v3
44+

pkg_build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ highest_stable_archive_version_for_date() {
157157
shopt -s nullglob
158158
for archive in "$archive_dir/$archive_prefix-"*.txz; do
159159
local name="${archive##*/}"
160-
local ver="${name#${archive_prefix}-}"
160+
local ver="${name#"${archive_prefix}-"}"
161161
ver="${ver%.txz}"
162162
if is_stable_version "$ver"; then
163163
local ver_date
@@ -187,7 +187,7 @@ next_stable_version_for_date() {
187187
echo "${target_date}.01"
188188
return
189189
fi
190-
echo "$(next_patch_version "$highest_for_date")"
190+
next_patch_version "$highest_for_date"
191191
}
192192

193193
should_package_file() {
@@ -369,7 +369,7 @@ tar --sort=name \
369369
--owner=0 \
370370
--group=0 \
371371
--numeric-owner \
372-
-cJf "$filename" *
372+
-cJf "$filename" ./*
373373

374374
cd "$CWD"
375375
md5=$(md5sum "$filename" | awk '{print $1}')

0 commit comments

Comments
 (0)