mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 21:48:32 +00:00
18 lines
549 B
TypeScript
18 lines
549 B
TypeScript
import { AbstractMigration } from '../base/abstract-migration';
|
|
|
|
export class GoModTidyMigration extends AbstractMigration {
|
|
override readonly deprecated = true;
|
|
override readonly propertyName = 'gomodTidy';
|
|
|
|
override run(value: unknown): void {
|
|
const postUpdateOptions = this.get('postUpdateOptions');
|
|
|
|
if (value) {
|
|
const newPostUpdateOptions = Array.isArray(postUpdateOptions)
|
|
? postUpdateOptions.concat(['gomodTidy'])
|
|
: ['gomodTidy'];
|
|
this.setHard('postUpdateOptions', newPostUpdateOptions);
|
|
}
|
|
}
|
|
}
|