Skip to content

Add dev to upload on every change and tail - #37

Merged
siliconwitch merged 1 commit into
mainfrom
dev
Oct 8, 2026
Merged

siliconwitch merged 1 commit into
mainfrom
dev

Conversation

@siliconwitch

Copy link
Copy Markdown
Member

Adds the dev command, the one entry in the help table that had no handler.

dev <imei|fleet_id> <file> ... uploads the named files or directories once, then follows the log the way tail does, and uploads again whenever a watched path changes and then stays still for one poll of 500 ms. It calls files.Upload and tail.Tail directly, so any change to either command carries over to dev. The layering test now allows that one sideways dependency.

For an IMEI target, dev looks up the device's fleet and follows that fleet narrowed to the device. A failed re-upload, such as a file missing mid-edit, is printed and watching continues. dev ends when the log ends or on Ctrl-C.

Dropped --log-file from the planned arguments as agreed.

Checks run with CGO_ENABLED=0: go build, go vet, go test ./... three times, gofmt -l, and go mod tidy with no change. Not exercised against a live server or device.

dev runs upload once, then tail in the background, and runs upload again
whenever a watched file or directory changes and then stays still for one
poll. It calls the two commands directly, so their behaviour and messages
carry over without further work. An IMEI target is narrowed in the log by
looking up its fleet.
@siliconwitch
siliconwitch merged commit fd6495f into main Oct 8, 2026
2 checks passed
@siliconwitch
siliconwitch deleted the dev branch October 8, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant