Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.go text
*.go text eol=lf
*.md text eol=lf
*.json text eol=lf
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./...
Expand Down
4 changes: 2 additions & 2 deletions pkg/logs/tail/logs_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 5 additions & 7 deletions scripts/check_commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading