mirror of
https://github.com/yusing/godoxy.git
synced 2026-02-26 02:35:19 +01:00
build: create placeholder JS files and tidy Go modules
- Add script logic to create empty placeholder files for minified JS files so go vet won't complain about missing files - Run go mod tidy in root and agent directory to clean up dependencies
This commit is contained in:
@@ -27,6 +27,17 @@ done
|
||||
if [ "${#fmt_go_files[@]}" -gt 0 ]; then
|
||||
gofmt -w "${fmt_go_files[@]}"
|
||||
fi
|
||||
|
||||
# create placeholder files for minified JS files so go vet won't complain
|
||||
while IFS= read -r file; do
|
||||
ext="${file##*.}"
|
||||
base="${file%.*}"
|
||||
min_file="${base}-min.${ext}"
|
||||
[ -f "$min_file" ] || : >"$min_file"
|
||||
done < <(find internal/ -name '*.js' ! -name '*-min.js')
|
||||
|
||||
go mod tidy
|
||||
go mod -C agent tidy
|
||||
git add -A
|
||||
git commit -m "Apply compat patch"
|
||||
go vet ./...
|
||||
|
||||
Reference in New Issue
Block a user