Skip to content

Commit

Permalink
feat: update of @o3r/dev-tools deprecation (#1140)
Browse files Browse the repository at this point in the history
## Proposed change

Finishing touches for deprecation of `@o3r/dev-tools`
  • Loading branch information
sdo-1A authored Dec 14, 2023
2 parents ad7269b + 0215750 commit cf6bf77
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 8 deletions.
10 changes: 10 additions & 0 deletions packages/@o3r/dev-tools/migration.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
6 changes: 5 additions & 1 deletion packages/@o3r/dev-tools/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -92,5 +93,8 @@
"engines": {
"node": ">=18.0.0"
},
"schematics": "./collection.json"
"schematics": "./collection.json",
"ng-update": {
"migrations": "./migration.json"
}
}
11 changes: 5 additions & 6 deletions packages/@o3r/dev-tools/schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
@@ -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('@o3r/dev-tools package is deprecated and will no longer be updated as of v12.');
return tree;
};
}
11 changes: 11 additions & 0 deletions packages/@o3r/dev-tools/schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
@@ -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('@o3r/dev-tools package is deprecated and will no longer be updated as of v12.');
return tree;
};
}
3 changes: 2 additions & 1 deletion packages/@o3r/dev-tools/src/cli/git-release-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit cf6bf77

Please sign in to comment.