Skip to content

Commit a320a12

Browse files
committed
Try to prepare sha256 and use it on install
1 parent f71ab82 commit a320a12

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

ci/before_deploy.sh

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ package() {
77
fi
88

99
cp -f target/$TARGET/release/$BIN_NAME bin/$BIN_NAME_TAG
10+
cd bin || return 1
11+
sha256sum "$BIN_NAME_TAG" | tee "$BIN_NAME_TAG.sha256"
12+
cd -
1013
}
1114

1215
release_tag() {

install.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,23 @@ name=languageclient
1111

1212
try_curl() {
1313
command -v curl > /dev/null && \
14-
curl --fail --location "$1" --output bin/$name
14+
curl --fail --location "$1" --output bin/$name && \
15+
curl --fail --location "$1.sha256" --output bin/$name.sha256
1516
}
1617

1718
try_wget() {
1819
command -v wget > /dev/null && \
19-
wget --output-document=bin/$name "$1"
20+
wget --output-document=bin/$name "$1" && \
21+
wget --output-document=bin/$name.sha256 "$1"
2022
}
2123

2224
download() {
2325
echo "Downloading bin/${name}..."
2426
url=https://github.com/autozimu/LanguageClient-neovim/releases/download/$version/${1}
2527
if (try_curl "$url" || try_wget "$url"); then
28+
cd bin || return 1
29+
sha256sum -c "$name.sha256" || return 1
30+
cd -
2631
chmod a+x bin/$name
2732
return
2833
else

0 commit comments

Comments
 (0)