Explorar el Código

Simplified updating the "#stable" branches process.

Kamil Piechaczek hace 6 años
padre
commit
2fdd927e10
Se han modificado 2 ficheros con 4 adiciones y 55 borrados
  1. 0 39
      scripts/release/update-mgit-branches.js
  2. 4 16
      scripts/update-stable-branches.sh

+ 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 mgitJsonPath = path.resolve( __dirname, '..', '..', 'mgit.json' );
-
-log.info( 'Updating the "mgit.json"...' );
-
-tools.updateJSONFile( mgitJsonPath, mgitJson => {
-	const dependencies = mgitJson.dependencies;
-
-	for ( const packageName of Object.keys( dependencies ) ) {
-		dependencies[ packageName ] = dependencies[ packageName ].split( '#' )[ 0 ];
-
-		if ( branchName !== 'master' ) {
-			dependencies[ packageName ] += '#' + branchName;
-		}
-	}
-
-	return mgitJson;
-} );
-
-log.info( `Done. "mgit.json" uses the "${ branchName }" branch now.` );

+ 4 - 16
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.
+	# 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.
+	# 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 `mgit.json` for `stable` and `master` branches is correct.
-	# `stable` branch.
-	git checkout stable && \
-	node ./scripts/release/update-mgit-branches stable && \
-	git commit -a -m "Internal: Use stable branches. [skip ci]"
-
-	# `master` branch.
-	git checkout master && \
-	git merge stable && \
-	node ./scripts/release/update-mgit-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 && \
 	mgit exec 'git push origin stable'