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

feat(manager): runtime version #29745

Merged
merged 15 commits into from
Jun 27, 2024
Merged
2 changes: 2 additions & 0 deletions lib/modules/manager/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import * as helmfile from './helmfile';
import * as helmsman from './helmsman';
import * as helmv3 from './helmv3';
import * as hermit from './hermit';
import * as herokuRuntime from './heroku-runtime';
import * as homebrew from './homebrew';
import * as html from './html';
import * as jenkins from './jenkins';
Expand Down Expand Up @@ -140,6 +141,7 @@ api.set('helmfile', helmfile);
api.set('helmsman', helmsman);
api.set('helmv3', helmv3);
api.set('hermit', hermit);
api.set('heroku-runtime', herokuRuntime);
api.set('homebrew', homebrew);
api.set('html', html);
api.set('jenkins', jenkins);
Expand Down
17 changes: 17 additions & 0 deletions lib/modules/manager/heroku-runtime/extract.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { extractPackageFile } from '.';

describe('modules/manager/heroku-runtime/extract', () => {
describe('extractPackageFile()', () => {
it('returns a result', () => {
const res = extractPackageFile('python-3.12.4\n');
expect(res.deps).toEqual([
{
depName: 'python',
commitMessageTopic: 'Python',
currentValue: '3.12.4',
datasource: 'docker',
},
]);
});
});
});
12 changes: 12 additions & 0 deletions lib/modules/manager/heroku-runtime/extract.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { DockerDatasource } from '../../datasource/docker';
import type { PackageDependency, PackageFileContent } from '../types';

export function extractPackageFile(content: string): PackageFileContent {
const dep: PackageDependency = {
depName: 'python',
commitMessageTopic: 'Python',
currentValue: content.replaceAll('python-', '').trim(),
setchy marked this conversation as resolved.
Show resolved Hide resolved
datasource: DockerDatasource.id,
};
return { deps: [dep] };
}
15 changes: 15 additions & 0 deletions lib/modules/manager/heroku-runtime/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Category } from '../../../constants';
import { DockerDatasource } from '../../datasource/docker';
import * as dockerVersioning from '../../versioning/docker';

export { extractPackageFile } from './extract';

export const supportedDatasources = [DockerDatasource.id];
setchy marked this conversation as resolved.
Show resolved Hide resolved

export const defaultConfig = {
fileMatch: ['^runtime.txt$'],
versioning: dockerVersioning.id,
setchy marked this conversation as resolved.
Show resolved Hide resolved
pinDigests: false,
};

export const categories: Category[] = ['python'];
1 change: 1 addition & 0 deletions lib/modules/manager/heroku-runtime/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Simply keeps the Heroku `runtime.txt` file updated.