gruntwork-io / fetch

Download files, folders, and release assets from a specific git commit, branch, or tag of public and private GitHub repos.
https://www.gruntwork.io/
MIT License
589 stars 90 forks source link

Add progress to file download #61

Closed ohlsont closed 4 years ago

ohlsont commented 4 years ago

This PR fixes issue issue https://github.com/gruntwork-io/fetch/issues/45

Progress on file download makes downloading large files much easier as feedback is given once per second now.

brikis98 commented 4 years ago

One test failed:

=== RUN   TestEmptyOptionValues
Incorrect Usage. invalid boolean value "" for -progress: strconv.ParseBool: parsing "": invalid syntax

NAME:
   main_test - A new cli application

USAGE:
   fetch.test [global options] command [command options] [arguments...]

VERSION:
   0.0.0

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --repo value                         
   --commit value                       
   --branch value                       
   --tag value                          
   --github-oauth-token value            [$GITHUB_OAUTH_TOKEN]
   --source-path value                  
   --release-asset value                
   --release-asset-checksum value       
   --release-asset-checksum-algo value  
   --github-api-version value           (default: "v3")
   --progress                           
   --help, -h                           show help
   --version, -v                        print the version
--- FAIL: TestEmptyOptionValues (0.00s)
    main_test.go:137: Expected 'You specified the --progress flag but did not provide any value.' but received 'invalid boolean value "" for -progress: strconv.ParseBool: parsing "": invalid syntax'
ohlsont commented 4 years ago

One test failed:

=== RUN   TestEmptyOptionValues
Incorrect Usage. invalid boolean value "" for -progress: strconv.ParseBool: parsing "": invalid syntax

NAME:
   main_test - A new cli application

USAGE:
   fetch.test [global options] command [command options] [arguments...]

VERSION:
   0.0.0

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --repo value                         
   --commit value                       
   --branch value                       
   --tag value                          
   --github-oauth-token value            [$GITHUB_OAUTH_TOKEN]
   --source-path value                  
   --release-asset value                
   --release-asset-checksum value       
   --release-asset-checksum-algo value  
   --github-api-version value           (default: "v3")
   --progress                           
   --help, -h                           show help
   --version, -v                        print the version
--- FAIL: TestEmptyOptionValues (0.00s)
  main_test.go:137: Expected 'You specified the --progress flag but did not provide any value.' but received 'invalid boolean value "" for -progress: strconv.ParseBool: parsing "": invalid syntax'

Ah, some tests can be run locally. That one works now anyways :). @brikis98 can you rerun the tests?

ohlsont commented 4 years ago

@brikis98?

josh-padnick commented 4 years ago

FYI, brikis98 is on vacation for this week but he'll be back next week.

ohlsont commented 4 years ago

FYI, brikis98 is on vacation for this week but he'll be back next week.

Ah, @josh-padnick I just want a rerun of the tests. Maybe you could help out?

brikis98 commented 4 years ago

I'm back now, thanks for waiting!

Just kicked off the tests again.

brikis98 commented 4 years ago

Tests passed! Merging now, thanks!

brikis98 commented 4 years ago

https://github.com/gruntwork-io/fetch/releases/tag/v0.3.8