Repository navigation
Add dev to upload on every change and tail - #37
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the
devcommand, 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 waytaildoes, and uploads again whenever a watched path changes and then stays still for one poll of 500 ms. It callsfiles.Uploadandtail.Taildirectly, so any change to either command carries over todev. The layering test now allows that one sideways dependency.For an IMEI target,
devlooks 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.devends when the log ends or on Ctrl-C.Dropped
--log-filefrom the planned arguments as agreed.Checks run with
CGO_ENABLED=0:go build,go vet,go test ./...three times,gofmt -l, andgo mod tidywith no change. Not exercised against a live server or device.