diff --git a/packages/@o3r/dev-tools/migration.json b/packages/@o3r/dev-tools/migration.json new file mode 100644 index 0000000000..32b09c1cbc --- /dev/null +++ b/packages/@o3r/dev-tools/migration.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://raw.githubusercontent.com/angular/angular-cli/master/packages/angular_devkit/schematics/collection-schema.json", + "schematics": { + "ng-update": { + "version": "10.0.0-alpha.0", + "description": "Updates of the Otter DevTools module to v10.0.x", + "factory": "./schematics/ng-update/index#ngUpdate" + } + } +} diff --git a/packages/@o3r/dev-tools/package.json b/packages/@o3r/dev-tools/package.json index 0ae5cd3b38..88aec1d244 100644 --- a/packages/@o3r/dev-tools/package.json +++ b/packages/@o3r/dev-tools/package.json @@ -1,6 +1,7 @@ { "name": "@o3r/dev-tools", "version": "0.0.0-placeholder", + "deprecated": "@o3r/dev-tools package is deprecated and will no longer be updated as of v12", "description": "Various CLI scripts to help your CI/CD process and your dependency management", "main": "./dist/src/public_api.js", "typings": "./dist/src/public_api.d.ts", @@ -92,5 +93,8 @@ "engines": { "node": ">=18.0.0" }, - "schematics": "./collection.json" + "schematics": "./collection.json", + "ng-update": { + "migrations": "./migration.json" + } } diff --git a/packages/@o3r/dev-tools/schematics/ng-add/index.ts b/packages/@o3r/dev-tools/schematics/ng-add/index.ts index 4a98b14328..73061ab0ab 100644 --- a/packages/@o3r/dev-tools/schematics/ng-add/index.ts +++ b/packages/@o3r/dev-tools/schematics/ng-add/index.ts @@ -1,12 +1,11 @@ -import { noop } from '@angular-devkit/schematics'; -import type { Rule } from '@angular-devkit/schematics'; +import type { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; /** * Add Otter dev-tools to an Angular Project - * - * @param options */ export function ngAdd(): Rule { - /* ng add rules */ - return noop(); + return (tree: Tree, context: SchematicContext) => { + context.logger.warn('This package is deprecated and will no longer be updated as of v12.'); + return tree; + }; } diff --git a/packages/@o3r/dev-tools/schematics/ng-update/index.ts b/packages/@o3r/dev-tools/schematics/ng-update/index.ts new file mode 100644 index 0000000000..6a5695fda6 --- /dev/null +++ b/packages/@o3r/dev-tools/schematics/ng-update/index.ts @@ -0,0 +1,11 @@ +import type { Rule, SchematicContext, Tree } from '@angular-devkit/schematics'; + +/** + * Update Otter dev-tools in an Angular Project + */ +export function ngUpdate(): Rule { + return (tree: Tree, context: SchematicContext) => { + context.logger.warn('This package is deprecated and will no longer be updated as of v12.'); + return tree; + }; +} diff --git a/packages/@o3r/dev-tools/src/cli/git-release-management.ts b/packages/@o3r/dev-tools/src/cli/git-release-management.ts index 76eed5f67c..16e553ae18 100644 --- a/packages/@o3r/dev-tools/src/cli/git-release-management.ts +++ b/packages/@o3r/dev-tools/src/cli/git-release-management.ts @@ -32,12 +32,13 @@ const logger = winston.createLogger({ transports: new winston.transports.Console() }); +logger.warn('This script is deprecated, will be removed in Otter v12.'); + /** * Performs the operations needed for the release candidate step * @param {object} version */ async function createRcRelease(version: SemVer) { - logger.warn('This script is deprecated, will be removed in Otter v12.'); logger.info(`Initiating release candidate process for ${version.format()}`); await checkoutCurrentAlphaOrNextBranch(version, logger); await createRcBranch(version, logger);