Skip to content

Commit 8875247

Browse files
amitds1997Copilot
andauthored
fix(nvim): installation for v0.11.0-v0.11.2 (#222)
* SHA-0 - fix(nvim): installation for v0.11.0-v0.11.2 * nit: Improve misleading info message Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent f0e271b commit 8875247

File tree

2 files changed

+30
-15
lines changed

2 files changed

+30
-15
lines changed

.github/workflows/installation_test.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Installation CI
3-
on: # yamllint disable-line rule:truthy
3+
on: # yamllint disable-line rule:truthy
44
push:
55
branches: [main]
66
paths: [scripts/, .github/workflows/installation_test.yml]
@@ -22,10 +22,10 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
config:
25-
- {instance: ubuntu-latest, arch: x86-64}
26-
- {instance: ubuntu-24.04-arm, arch: arm64}
25+
- { instance: ubuntu-latest, arch: x86-64 }
26+
- { instance: ubuntu-24.04-arm, arch: arm64 }
2727
install_method: [binary, source]
28-
neovim_version: [stable, nightly, v0.9.0]
28+
neovim_version: [stable, nightly, v0.9.0, v0.11.0]
2929
exclude:
3030
- config:
3131
arch: arm64
@@ -34,6 +34,8 @@ jobs:
3434
arch: x86-64
3535
install_method: source
3636
neovim_version: v0.9.0
37+
- install_method: source
38+
neovim_version: v0.11.0
3739
runs-on: ubuntu-latest
3840
steps:
3941
- uses: actions/checkout@v4
@@ -54,13 +56,15 @@ jobs:
5456
fail-fast: false
5557
matrix:
5658
config:
57-
- {instance: macos-13, arch: x86_64}
58-
- {instance: macos-15, arch: arm64}
59+
- { instance: macos-13, arch: x86_64 }
60+
- { instance: macos-15, arch: arm64 }
5961
install_method: [binary, source]
60-
neovim_version: [stable, nightly, v0.9.0]
62+
neovim_version: [stable, nightly, v0.9.0, v0.11.0]
6163
exclude:
6264
- install_method: source
6365
neovim_version: v0.9.0
66+
- install_method: source
67+
neovim_version: v0.11.0
6468
runs-on: ${{ matrix.config.instance }}
6569
steps:
6670
- uses: actions/checkout@v4
@@ -77,10 +81,10 @@ jobs:
7781
fail-fast: false
7882
matrix:
7983
config:
80-
- {instance: ubuntu-latest, arch: x86-64}
81-
- {instance: ubuntu-24.04-arm, arch: arm64}
82-
- {instance: macos-13, arch: x86_64}
83-
- {instance: macos-15, arch: arm64}
84+
- { instance: ubuntu-latest, arch: x86-64 }
85+
- { instance: ubuntu-24.04-arm, arch: arm64 }
86+
- { instance: macos-13, arch: x86_64 }
87+
- { instance: macos-15, arch: arm64 }
8488
neovim_version: [stable, nightly, v0.9.0]
8589
exclude:
8690
- config:

scripts/utils/neovim.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,30 @@ function get_sha256 {
124124
local DOWNLOAD_URI
125125
DOWNLOAD_URI=$(build_github_uri "$VERSION" "$OS" "$ARCH_TYPE")
126126

127-
local is_lesser
127+
local older_than_v0_11 older_than_v0_11_3
128+
is_lesser_version "$VERSION" v0.11.0
129+
older_than_v0_11=$?
128130
is_lesser_version "$VERSION" v0.11.3
129-
is_lesser=$?
131+
older_than_v0_11_3=$?
130132

131133
local SHA256_URI
132134
local SHA256_SUM
133-
if [[ $is_lesser -eq 0 ]]; then
134-
info "Neovim version $VERSION is less than 0.11.3, using legacy checksum file"
135+
if [[ $older_than_v0_11 -eq 0 ]]; then
136+
info "Neovim version $VERSION is less than 0.11.0, using legacy checksum file"
135137

136138
SHA256_URI="${DOWNLOAD_URI}.sha256sum"
137139
SHA256_SUM=$(run_api_call "$SHA256_URI")
138140

139141
SHA256_SUM=$(printf '%s\n' "$SHA256_SUM" | awk '{print $1}')
142+
elif [[ $older_than_v0_11_3 -eq 0 ]]; then
143+
info "Neovim version $VERSION is between 0.11.0 and 0.11.2, using shasum.txt file"
144+
local base_path release_name
145+
base_path=$(dirname "$DOWNLOAD_URI")
146+
release_name=$(basename "$DOWNLOAD_URI")
147+
SHA256_URI="$base_path/shasum.txt"
148+
SHA256_SUM=$(run_api_call "$SHA256_URI")
149+
150+
SHA256_SUM=$(printf '%s\n' "$SHA256_SUM" | grep "$release_name" | grep -v "zsync" | awk '{print $1}')
140151
else
141152
info "Neovim version $VERSION is greater than or equal to 0.11.3, using GitHub's checksum API"
142153

0 commit comments

Comments
 (0)