Skip to content
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: 2 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"hashin",
"helm",
"helmfile",
"mise",
"nix",
"node",
"npm",
Expand Down Expand Up @@ -130,6 +131,7 @@
"hashin",
"helm",
"helmfile",
"mise",
"nix",
"node",
"npm",
Expand Down
17 changes: 17 additions & 0 deletions docs/custom-registries.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,23 @@ Samples:
https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv5.3.0/kustomize_v5.3.0_linux_amd64.tar.gz
```

## `mise`

mise releases are downloaded from:

- `https://github.com/jdx/mise/releases`

When no version is specified, the url `https://mise.jdx.dev/VERSION` is used to find the latest version.

Samples:

```txt
https://github.com/jdx/mise/releases/download/v2026.2.13/mise-v2026.2.13-linux-x64.tar.xz
https://github.com/jdx/mise/releases/download/v2026.2.13/mise-v2026.2.13-linux-arm64.tar.xz
https://github.com/jdx/mise/releases/download/v2026.2.13/SHASUMS256.txt
https://mise.jdx.dev/VERSION
```

## `mono`

Mono releases are downloaded from:
Expand Down
3 changes: 3 additions & 0 deletions src/cli/install-tool/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import { ScalaInstallService } from '../tools/java/scala';
import { JsonnetBundlerInstallService } from '../tools/jb';
import { KubectlInstallService } from '../tools/kubectl';
import { KustomizeInstallService } from '../tools/kustomize';
import { MiseInstallService, MiseVersionResolver } from '../tools/mise';
import { MonoInstallService } from '../tools/mono';
import { NixInstallService } from '../tools/nix';
import { NodeInstallService } from '../tools/node';
Expand Down Expand Up @@ -145,6 +146,7 @@ async function prepareInstallContainer(): Promise<Container> {
container.bind(INSTALL_TOOL_TOKEN).to(KubectlInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(KustomizeInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(MavenInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(MiseInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(MonoInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(NixInstallService);
container.bind(INSTALL_TOOL_TOKEN).to(NugetInstallService);
Expand Down Expand Up @@ -202,6 +204,7 @@ function prepareResolveContainer(): Container {
container.bind(TOOL_VERSION_RESOLVER).to(JavaJreVersionResolver);
container.bind(TOOL_VERSION_RESOLVER).to(JavaJdkVersionResolver);
container.bind(TOOL_VERSION_RESOLVER).to(MavenVersionResolver);
container.bind(TOOL_VERSION_RESOLVER).to(MiseVersionResolver);
container.bind(TOOL_VERSION_RESOLVER).to(NodeVersionResolver);
container.bind(TOOL_VERSION_RESOLVER).to(NugetVersionResolver);
container.bind(TOOL_VERSION_RESOLVER).to(PhpVersionResolver);
Expand Down
1 change: 1 addition & 0 deletions src/cli/tools/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const NoPrepareTools = [
'kustomize',
'lerna',
'maven',
'mise',
'nix',
'nuget',
'npm',
Expand Down
83 changes: 83 additions & 0 deletions src/cli/tools/mise.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import fs from 'node:fs/promises';
import { join } from 'node:path';
import { isNonEmptyStringAndNotWhitespace } from '@sindresorhus/is';
import { injectFromHierarchy, injectable } from 'inversify';
import { BaseInstallService } from '../install-tool/base-install.service';
import { ToolVersionResolver } from '../install-tool/tool-version-resolver';

@injectable()
@injectFromHierarchy()
export class MiseInstallService extends BaseInstallService {
readonly name = 'mise';

private get arch(): string {
switch (this.envSvc.arch) {
case 'arm64':
return 'arm64';
case 'amd64':
return 'x64';
}
}

override async install(version: string): Promise<void> {
/**
* @example
* @see {@href https://github.com/jdx/mise/releases/tag/v2026.2.13}
*/
const baseUrl = `https://github.com/jdx/mise/releases/download/v${version}/`;

const filename = `mise-v${version}-linux-${this.arch}.tar.xz`;

const checksumFile = await this.http.download({
url: `${baseUrl}SHASUMS256.txt`,
});
const expectedChecksum = (await fs.readFile(checksumFile, 'utf-8'))
.split('\n')
.find((l) => l.endsWith(` ./${filename}`))
?.split(/\s+/)[0];

if (!expectedChecksum) {
throw new Error(
`Cannot find checksum for '${filename}' in SHASUMS256.txt`,
);
}

const file = await this.http.download({
url: `${baseUrl}${filename}`,
checksumType: 'sha256',
expectedChecksum,
});

await this.pathSvc.ensureToolPath(this.name);

const path = await this.pathSvc.createVersionedToolPath(this.name, version);
await this.compress.extract({
file,
cwd: path,
strip: 1,
files: ['mise/bin/mise'],
});
}

override async link(version: string): Promise<void> {
const src = join(this.pathSvc.versionedToolPath(this.name, version), 'bin');
await this.shellwrapper({ srcDir: src });
}

override async test(_version: string): Promise<void> {
await this._spawn(this.name, ['version']);
}
}

@injectable()
@injectFromHierarchy()
export class MiseVersionResolver extends ToolVersionResolver {
readonly tool = 'mise';

async resolve(version: string | undefined): Promise<string | undefined> {
if (!isNonEmptyStringAndNotWhitespace(version) || version === 'latest') {
return (await this.http.get('https://mise.jdx.dev/VERSION')).trim();
}
return version;
}
}
3 changes: 3 additions & 0 deletions test/Dockerfile.distro
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ RUN install-tool kubectl v1.35.1
# renovate: datasource=github-releases packageName=kubernetes-sigs/kustomize
RUN install-tool kustomize 5.8.1

# renovate: datasource=github-releases packageName=jdx/mise
RUN install-tool mise 2026.2.13

# renovate: datasource=datasource=github-releases packageName=containerbase/nix-prebuild
RUN install-tool nix 2.24.10

Expand Down
3 changes: 3 additions & 0 deletions test/latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ RUN install-tool gleam 1.14.0
# renovate: datasource=github-releases packageName=kubernetes/kubernetes
RUN install-tool kubectl v1.35.1

# renovate: datasource=github-releases packageName=jdx/mise
RUN install-tool mise 2026.2.13

# renovate: datasource=github-releases packageName=containerbase/skopeo-prebuild
RUN install-tool skopeo 1.22.0

Expand Down
3 changes: 3 additions & 0 deletions test/latest/Dockerfile.arm64
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ FROM base AS test-others
# renovate: datasource=github-releases packageName=kubernetes/kubernetes
RUN install-tool kubectl v1.35.1

# renovate: datasource=github-releases packageName=jdx/mise
RUN install-tool mise 2026.2.13

# renovate: datasource=github-releases packageName=containerbase/skopeo-prebuild
RUN install-tool skopeo 1.22.0

Expand Down