-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to prepare sha256 and use it on install #801
base: next
Are you sure you want to change the base?
Conversation
ci/before_deploy.sh
Outdated
@@ -7,6 +7,9 @@ package() { | |||
fi | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks sure done in 1509f42
@@ -11,18 +11,23 @@ name=languageclient | |||
|
|||
try_curl() { | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it needed to cleanup previous sha256 before downloading? Like the current cleanup of bin file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
install.sh
Outdated
} | ||
|
||
download() { | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Hi, I would like to prepare and use a
release-exe.sha256
file 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!