Skip to content

Commit

Permalink
Fix download and verify (#27)
Browse files Browse the repository at this point in the history
* add test case for checksum download
* set correct responseType for shasum downloads

The default axios responseType is 'json'. In this case we're downloading
a text file (list of shasums) and a binary file (the signature), so
different responeTypes are required.

* add test for downloading and validating a release
* fix incomplete download errors

The download method now waits until all data has been downloaded
and written to the destination file. Before this, the method was resolved
too early, and as a result, subsequent operations ran on an incomplete
download. This caused operations like verify to fail, because of a
different shasum.

* add gitattributes file to fix checksum test on windows
* add type for shared release variable in tests
  • Loading branch information
dbanck authored Mar 15, 2022
1 parent 53abd10 commit 50fb34f
Show file tree
Hide file tree
Showing 5 changed files with 320 additions and 15 deletions.
8 changes: 8 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ensure line endings are always Unix-style for known text files
# GitHub Actions CI doesn't have "native" solution for this
# See https://github.com/actions/checkout/issues/226
*.ts text eol=lf
*.json text eol=lf
*.md text eol=lf
*.tf text eol=lf
*.txt text eol=lf
Loading

0 comments on commit 50fb34f

Please sign in to comment.