Try to prepare sha256 and use it on install#801
Conversation
|
|
||
| cp -f target/$TARGET/release/$BIN_NAME bin/$BIN_NAME_TAG | ||
| cd bin || return 1 | ||
| sha256sum "$BIN_NAME_TAG" | tee "$BIN_NAME_TAG.sha256" |
There was a problem hiding this comment.
Thanks for the work!
Can you update this a little bit to
sha256sum "$BIN_NAME_TAG" | tee "bin/$BIN_NAME_TAG.sha256"
rather than changing dirs twice?
| command -v curl > /dev/null && \ | ||
| curl --fail --location "$1" --output bin/$name | ||
| curl --fail --location "$1" --output bin/$name && \ | ||
| curl --fail --location "$1.sha256" --output bin/$name.sha256 |
There was a problem hiding this comment.
Is it needed to cleanup previous sha256 before downloading? Like the current cleanup of bin file.
There was a problem hiding this comment.
With the --output from curl and --output-document from wget the file will be overwritten so I don't think its useful but if you think its safer let me know
| echo "Downloading bin/${name}..." | ||
| url=https://github.com/autozimu/LanguageClient-neovim/releases/download/$version/${1} | ||
| if (try_curl "$url" || try_wget "$url"); then | ||
| sha256sum -c "bin/$name.sha256" || return 1 |
There was a problem hiding this comment.
Sorry for the late update.
Can you please split this PR into two? One includes generating the SHA files and the other downloading and checking SHA. Since this is modifying the installation, erroneous script will resulting release unable to install.
Another issue, can you print an error message here before return 1?
Thanks again for your contribution.
Hi, I would like to prepare and use a
release-exe.sha256file for each release and use it to check the checksum on theinstall.sh; I'm not sure about the result file and deploy process so maybe its a good template if its interesting for you ? cheers and thanks for this project!