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: update of @o3r/dev-tools deprecation #1140

Merged
merged 1 commit into from
Dec 14, 2023
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
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
Loading