Skip to content

Commit

Permalink
Merge pull request #8061 from jandubois/rddepman-spin-kube-plugin
Browse files Browse the repository at this point in the history
Add spin kube plugin to rddepman version checking
  • Loading branch information
mook-as authored Jan 10, 2025
2 parents 39f9439 + 47de29d commit 660fc4b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions scripts/dependencies/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,3 +627,26 @@ export class SpinCLI implements Dependency, GitHubDependency {
return semver.rcompare(version1, version2);
}
}

export class SpinKubePlugin implements Dependency, GitHubDependency {
name = 'spinKubePlugin';
githubOwner = 'spinkube';
githubRepo = 'spin-plugin-kube';

download(context: DownloadContext): Promise<void> {
// We don't download anything there; `resources/setup-spin` does the installation.
return Promise.resolve();
}

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

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

rcompareVersions(version1: string, version2: string): -1 | 0 | 1 {
return semver.rcompare(version1, version2);
}
}
1 change: 1 addition & 0 deletions scripts/rddepman.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const dependencies: Dependency[] = [
new tools.CertManager(),
new tools.SpinOperator(),
new tools.SpinCLI(),
new tools.SpinKubePlugin(),
];

function git(...args: string[]): number | null {
Expand Down

0 comments on commit 660fc4b

Please sign in to comment.