Ver código fonte

Merge branch 't/773' of github.com:ckeditor/ckeditor5 into t/773

Kamil Piechaczek 6 anos atrás
pai
commit
62c6a607c7

+ 1 - 0
mrgit.json

@@ -1,6 +1,7 @@
 {
   "packages": "packages/",
   "packagesPrefix": "@ckeditor/ckeditor5-",
+  "baseBranches": [ "master", "stable" ],
   "dependencies": {
     "@ckeditor/ckeditor5-adapter-ckfinder": "ckeditor/ckeditor5-adapter-ckfinder",
     "@ckeditor/ckeditor5-alignment": "ckeditor/ckeditor5-alignment",

+ 0 - 39
scripts/release/update-mgit-branches.js

@@ -1,39 +0,0 @@
-#!/usr/bin/env node
-
-/**
- * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
- */
-
-/* eslint-env node */
-
-'use strict';
-
-const branchName = process.argv[ 2 ];
-
-if ( !branchName ) {
-	throw new Error( 'Missing branch name.' );
-}
-
-const path = require( 'path' );
-const { tools, logger } = require( '@ckeditor/ckeditor5-dev-utils' );
-const log = logger();
-const mrgitJsonPath = path.resolve( __dirname, '..', '..', 'mrgit.json' );
-
-log.info( 'Updating the "mrgit.json"...' );
-
-tools.updateJSONFile( mrgitJsonPath, mrgitJson => {
-	const dependencies = mrgitJson.dependencies;
-
-	for ( const packageName of Object.keys( dependencies ) ) {
-		dependencies[ packageName ] = dependencies[ packageName ].split( '#' )[ 0 ];
-
-		if ( branchName !== 'master' ) {
-			dependencies[ packageName ] += '#' + branchName;
-		}
-	}
-
-	return mrgitJson;
-} );
-
-log.info( `Done. "mrgit.json" uses the "${ branchName }" branch now.` );

+ 6 - 18
scripts/update-stable-branches.sh

@@ -10,28 +10,16 @@ echo ""
 
 if [[ $REPLY =~ ^[Yy]$ ]]
 then
-	# Update the `stable` branch in the ckeditor5 repository.
+	# Update the `stable` branch in the `ckeditor5` repository.
 	git checkout stable && git merge master && git checkout master
 
-	# Add `stable` branches in all repos which don't have them yet.
-	mrgit exec 'git checkout -b stable 2> /dev/null && git push origin stable && git checkout master'
+	# Add `#stable` branches in all repos which don't have them yet.
+	mgit exec 'git checkout -b stable 2> /dev/null && git push origin stable && git checkout master'
 
-	# Update all `stable` branches in all packages.
-	mrgit exec 'git checkout stable && git pull origin stable && git merge master && git checkout master'
+	# Update all `#stable` branches in all packages.
+	mgit exec 'git checkout stable && git pull origin stable && git merge master && git checkout master'
 
-	# Make sure that `mrgit.json` for `stable` and `master` branches is correct.
-	# `stable` branch.
-	git checkout stable && \
-	node ./scripts/release/update-mrgit-branches stable && \
-	git commit -a -m "Internal: Use stable branches. [skip ci]"
-
-	# `master` branch.
-	git checkout master && \
-	git merge stable && \
-	node ./scripts/release/update-mrgit-branches master && \
-	git commit -a -m "Internal: Use master branches. [skip ci]"
-
-	# Push the `stable` branches.
+	# Push the `#stable` branches.
 	git push origin stable master && \
 	mrgit exec 'git push origin stable'