How to use the @ckeditor/ckeditor5-dev-env/lib/release-tools/utils/cli.provideToken function in @ckeditor/ckeditor5-dev-env

To help you get started, we’ve selected a few @ckeditor/ckeditor5-dev-env examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ckeditor / ckeditor5-react / scripts / release.js View on Github external
const log = logger();
const packageRoot = path.resolve( __dirname, '..' );
const packageJsonPath = path.resolve( packageRoot, 'package.json' );
const templatePath = path.resolve( packageRoot, 'scripts', 'template' );
const packageJsonTemplatePath = path.resolve( templatePath, 'package.json' );
const packageJsonTemplateCopy = require( packageJsonTemplatePath );

// That files will be copied from source to template directory and will be released too.
const additionalFiles = [
	'CHANGELOG.md',
	'LICENSE.md',
	'README.md',
	'dist'
];

cli.provideToken()
	.then( token => {
		const gitVersion = versionUtils.getLastTagFromGit();
		const changelogVersion = versionUtils.getLastFromChangelog();

		log.info( 'Checking whether there is anything to release...' );

		// If the last tag is equal to version saved in changelog, we don't have new version for release.
		if ( gitVersion === changelogVersion ) {
			return reject( 'Before starting the release process, you should generate the changelog.' );
		}

		const releaseDescription = getChangesForVersion( changelogVersion );

		log.info( 'Validating the repository for the release...' );

		const errors = validatePackageToRelease( {
github ckeditor / ckeditor5-angular / scripts / release.js View on Github external

'use strict';

const path = require( 'path' );
const { tools, logger } = require( '@ckeditor/ckeditor5-dev-utils' );
const versionUtils = require( '@ckeditor/ckeditor5-dev-env/lib/release-tools/utils/versions' );
const cli = require( '@ckeditor/ckeditor5-dev-env/lib/release-tools/utils/cli' );
const createGithubRelease = require( '@ckeditor/ckeditor5-dev-env/lib/release-tools/utils/creategithubrelease' );
const validatePackageToRelease = require( '@ckeditor/ckeditor5-dev-env/lib/release-tools/utils/validatepackagetorelease' );
const { getChangesForVersion } = require( '@ckeditor/ckeditor5-dev-env/lib/release-tools/utils/changelog' );

const log = logger();
const packageRoot = path.resolve( __dirname, '..' );
const distPath = path.resolve( packageRoot, 'dist' );

cli.provideToken()
	.then( token => {
		const gitVersion = versionUtils.getLastTagFromGit();
		const changelogVersion = versionUtils.getLastFromChangelog();

		log.info( 'Checking whether there is anything to release...' );

		// If the last tag is equal to version saved in changelog, we don't have new version for release.
		if ( gitVersion === changelogVersion ) {
			return reject( 'Before starting the release process, you should generate the changelog and then build the package.' );
		}

		const releaseDescription = getChangesForVersion( changelogVersion );

		log.info( 'Validating the repository for the release...' );

		const errors = validatePackageToRelease( {
github ckeditor / ckeditor5-vue / scripts / release.js View on Github external
const log = logger();
const packageRoot = path.resolve( __dirname, '..' );
const packageJsonPath = path.resolve( packageRoot, 'package.json' );
const templatePath = path.resolve( packageRoot, 'scripts', 'template' );
const packageJsonTemplatePath = path.resolve( templatePath, 'package.json' );
const packageJsonTemplateCopy = require( packageJsonTemplatePath );

// That files will be copied from source to template directory and will be released too.
const additionalFiles = [
	'CHANGELOG.md',
	'LICENSE.md',
	'README.md',
	'dist'
];

cli.provideToken()
	.then( token => {
		const gitVersion = versionUtils.getLastTagFromGit();
		const changelogVersion = versionUtils.getLastFromChangelog();

		log.info( 'Checking whether there is anything to release...' );

		// If the last tag is equal to version saved in changelog, we don't have new version for release.
		if ( gitVersion === changelogVersion ) {
			return reject( 'Before starting the release process, you should generate the changelog.' );
		}

		const releaseDescription = getChangesForVersion( changelogVersion );

		log.info( 'Validating the repository for the release...' );

		const errors = validatePackageToRelease( {