Skip to content
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

Don't include leading v in dependencies.yaml for check-spelling #8067

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/rancher-desktop/assets/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ spinOperator: 0.4.0
certManager: 1.16.2
spinCLI: 3.1.1
spinKubePlugin: 0.3.1
check-spelling: v0.0.24
check-spelling: 0.0.24
8 changes: 3 additions & 5 deletions scripts/dependencies/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,17 +240,15 @@ export class CheckSpelling implements Dependency, GitHubDependency {
}

async getAvailableVersions(includePrerelease = false): Promise<string[]> {
const versions = await getPublishedVersions(this.githubOwner, this.githubRepo, includePrerelease);

return versions.map(v => `v${ v }`);
return await getPublishedVersions(this.githubOwner, this.githubRepo, includePrerelease);
}

versionToTagName(version: string): string {
return version;
return `v${ version }`;
}

rcompareVersions(version1: string, version2: string): -1 | 0 | 1 {
return semver.rcompare(version1.replace(/^v/, ''), version2.replace(/^v/, ''));
return semver.rcompare(version1, version2);
}
}

Expand Down
2 changes: 1 addition & 1 deletion scripts/spelling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ find_script() {
local script=$checkout/unknown-words.sh
local repo=https://github.com/check-spelling/check-spelling
local version
version=$(yq --exit-status .check-spelling pkg/rancher-desktop/assets/dependencies.yaml)
version="v$(yq --exit-status .check-spelling pkg/rancher-desktop/assets/dependencies.yaml)"

if [[ ! -d "$checkout" ]]; then
git clone --branch "$version" --depth 1 "$repo" "$checkout" >&2
Expand Down
Loading