mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4825] Use ADF-CLI in ADF for versions and latest commit (#4994)
* [ADF-4825] Use ADF-CLI in ADF for versions and latest commit * Add documentation * Update update-version.ts * Update release.sh * Update update-project.sh * Update release.sh * Update update-project.sh * Update release.sh * Update update-project.sh * Update README.md * Rebase branch * Update package.json * Update build.sh * Update package.json
This commit is contained in:
committed by
Maurizio Vitale
parent
3aed425020
commit
8a48738b99
@@ -23,6 +23,7 @@ import { spawnSync } from 'child_process';
|
||||
export interface CommitArgs {
|
||||
pointer: string;
|
||||
pathPackage: string;
|
||||
skipGnu: boolean;
|
||||
}
|
||||
|
||||
function _exec(command: string, args: string[], opts: { cwd?: string }, logger: logging.Logger) {
|
||||
@@ -55,7 +56,11 @@ function _commitPerform(args: CommitArgs, logger: logging.Logger): string {
|
||||
function _replacePerform(args: CommitArgs, sha: string, logger: logging.Logger) {
|
||||
logger.info(`Replace commit ${sha} in package...`);
|
||||
const sedRule = `s/\"commit\": \".*\"/\"commit\": \"${sha}\"/g`;
|
||||
_exec('sed', [`-i`, `${sedRule}`, `${args.pathPackage}/package.json`], {}, logger);
|
||||
if (args.skipGnu) {
|
||||
_exec('sed', [`-i`, '', `${sedRule}`, `${args.pathPackage}/package.json`], {}, logger);
|
||||
} else {
|
||||
_exec('sed', [`-i`, `${sedRule}`, `${args.pathPackage}/package.json`], {}, logger);
|
||||
}
|
||||
}
|
||||
|
||||
export default async function (args: CommitArgs, logger: logging.Logger) {
|
||||
|
Reference in New Issue
Block a user