mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-17 05:59:42 +02: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
|
if [ "${#fmt_go_files[@]}" -gt 0 ]; then
|
||||||
gofmt -w "${fmt_go_files[@]}"
|
gofmt -w "${fmt_go_files[@]}"
|
||||||
fi
|
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 add -A
|
||||||
git commit -m "Apply compat patch"
|
git commit -m "Apply compat patch"
|
||||||
go vet ./...
|
go vet ./...
|
||||||
|
|||||||
Reference in New Issue
Block a user