Some fixes to our infrastructure (#5705)

Minor things, mainly to improve the experience on Windows; see
individual commit messages.
This commit is contained in:
Stefan Haller 2026-06-16 16:28:41 +02:00 committed by GitHub
commit 69004ce208
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 10 deletions

2
.gitattributes vendored
View file

@ -1,3 +1,3 @@
*.go text
*.go text eol=lf
*.md text eol=lf
*.json text eol=lf

View file

@ -22,8 +22,13 @@ unit-test:
go test ./... -short
# Run both unit tests and integration tests.
[unix]
test: unit-test e2e-all
# On Windows, integration tests are not supported right now
[windows]
test: unit-test
# Generate all our auto-generated files (test list, cheatsheets, json schema, maybe other things in the future)
generate:
go generate ./...

View file

@ -11,8 +11,8 @@ import (
)
func tailLogsForPlatform(logFilePath string, opts *humanlog.HandlerOptions) {
var lastModified int64 = 0
var lastOffset int64 = 0
var lastModified int64
var lastOffset int64
for {
stat, err := os.Stat(logFilePath)
if err != nil {

View file

@ -5,15 +5,13 @@
set -e
git diff --quiet || {
echo "Error: there are unstaged changes. Please stage or stash them before running this script."
exit 1
}
just test
just lint
status_before_generate=$(git status --porcelain=v1)
just generate
git diff --quiet || {
status_after_generate=$(git status --porcelain=v1)
if [[ "$status_after_generate" != "$status_before_generate" ]]; then
echo "Error: auto-generated files not up to date."
exit 1
}
fi