Ben Dwyer 3 éve
szülő
commit
513d7937b8

+ 1 - 1
blockbase/package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "blockbase",
-  "version": "1.2.9",
+  "version": "1.2.11",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
blockbase/package.json

@@ -1,6 +1,6 @@
 {
   "name": "blockbase",
-  "version": "1.2.9",
+  "version": "1.2.11",
   "description": "Blank Parent Theme",
   "bugs": {
     "url": "https://github.com/Automattic/themes/issues"

+ 1 - 1
blockbase/style.css

@@ -7,7 +7,7 @@ Description: Blockbase is a simple theme that supports full-site editing. It com
 Requires at least: 5.7
 Tested up to: 5.7
 Requires PHP: 5.7
-Version: 1.2.9
+Version: 1.2.11
 License: GNU General Public License v2 or later
 License URI: https://raw.githubusercontent.com/Automattic/themes/trunk/LICENSE
 Text Domain: blockbase

+ 1 - 1
package-lock.json

@@ -1,6 +1,6 @@
 {
 	"name": "themes",
-	"version": "1.0.12",
+	"version": "1.0.13",
 	"lockfileVersion": 1,
 	"requires": true,
 	"dependencies": {

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 	"name": "themes",
-	"version": "1.0.12",
+	"version": "1.0.13",
 	"description": "Automattic public themes",
 	"author": "automattic",
 	"license": "GPL-2.0",

+ 27 - 17
theme-utils.mjs

@@ -33,7 +33,7 @@ function showHelp(){
 	console.log('Help info can go here');
 }
 
-/* 
+/*
  Determine what changes would be deployed
 */
 async function deployPreview() {
@@ -51,7 +51,7 @@ async function deployPreview() {
 
 	let changedThemes = await getChangedThemes(hash);
 	console.log(`The following themes have changes:\n${changedThemes}`);
-	
+
 	let logs = await executeCommand(`git log --reverse --pretty=format:%s ${hash}..HEAD`);
 	console.log(`\n\nCommit log of changes to be deployed:\n\n${logs}\n\n`);
 }
@@ -102,16 +102,18 @@ async function pushButtonDeploy(repoType) {
 
 		let hash = await getLastDeployedHash();
 		let diffUrl;
-
+		console.log('minus three');
 		await versionBumpThemes();
-
+		console.log('minus two');
 		let changedThemes = await getChangedThemes(hash);
-
+		console.log('minus one');
 		//TODO: Can these be automagically uploaded?
 		//await buildChangedOrgZips();
-
+		console.log('one');
 		await pushChangesToSandbox();
+		console.log('two');
 		await updateLastDeployedHash();
+		console.log('tree');
 
 		if (repoType === 'git' ) {
 			diffUrl = await createGitPhabricatorDiff(hash);
@@ -120,7 +122,7 @@ async function pushButtonDeploy(repoType) {
 			diffUrl = await createSvnPhabricatorDiff(hash);
 		}
 		let diffId = diffUrl.split('a8c.com/')[1];
-
+		console.log('four');
 		//push changes (from version bump)
 		await executeCommand('git push');
 
@@ -200,8 +202,8 @@ async function landChangesGit(diffId){
 async function landChangesSvn(diffId){
 	return await executeOnSandbox(`
 		cd ${sandboxPublicThemesFolder};
-		svn ci -m ${diffId} 
-	`, true); 
+		svn ci -m ${diffId}
+	`, true);
 }
 
 async function getChangedThemes(hash) {
@@ -277,13 +279,12 @@ async function versionBumpThemes() {
 		}
 
 		versionBumpCount++;
-
 		let hasVersionBump = await checkThemeForVersionBump(theme, hash);
 		if( hasVersionBump ){
-			// console.log(`${theme} has already been version bumped`);
+			console.log(`${theme} has already been version bumped`);
 			continue;
 		}
-
+		console.log( theme );
 		await versionBumpTheme(theme);
 	}
 
@@ -327,12 +328,21 @@ async function versionBumpTheme(theme){
  Compares the value of 'version' in package.json between the hash and current value
 */
 async function checkThemeForVersionBump(theme, hash){
-	let previousPackageString = await executeCommand(`
+	console.log( 'checkThemeForVersionBump' );
+	console.log( theme );
+	console.log( hash );
+	executeCommand(`
 		git show ${hash}:${theme}/package.json 2>/dev/null
-	`);
-	let previousPackage = JSON.parse(previousPackageString);
-	let currentPackage = JSON.parse(fs.readFileSync(`${theme}/package.json`))
-	return previousPackage.version != currentPackage.version;
+	`).catch( ( error ) => {
+		console.log( 'this is an error' );
+		console.log( error );
+		return false;
+	} ).then( ( previousPackageString ) => {
+		console.log( previousPackageString );
+		let previousPackage = JSON.parse(previousPackageString);
+		let currentPackage = JSON.parse(fs.readFileSync(`${theme}/package.json`))
+		return previousPackage.version != currentPackage.version;
+	});
 }
 
 /*

+ 1 - 1
videomaker/package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "videomaker",
-  "version": "0.0.9",
+  "version": "0.0.11",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
videomaker/package.json

@@ -1,6 +1,6 @@
 {
   "name": "videomaker",
-  "version": "0.0.9",
+  "version": "0.0.11",
   "description": "",
   "main": "style.css",
   "dependencies": {},

+ 1 - 1
videomaker/style.css

@@ -7,7 +7,7 @@ Description:
 Requires at least: 5.7
 Tested up to: 5.7
 Requires PHP: 5.7
-Version: 0.0.9
+Version: 0.0.11
 License: GNU General Public License v2 or later
 License URI: 
 Template: blockbase

+ 1 - 1
zoologist/package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "zoologist",
-  "version": "0.0.3",
+  "version": "1.0.1",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
zoologist/package.json

@@ -1,6 +1,6 @@
 {
   "name": "zoologist",
-  "version": "0.0.3",
+  "version": "1.0.1",
   "description": "",
   "main": "style.css",
   "dependencies": {},

+ 2 - 2
zoologist/style.css

@@ -7,7 +7,7 @@ Description: Zoologist is a simple blogging theme that supports full-site editin
 Requires at least: 5.7
 Tested up to: 5.7
 Requires PHP: 5.7
-Version: 1.0.0
+Version: 1.0.1
 License: GNU General Public License v2 or later
 License URI: https://raw.githubusercontent.com/Automattic/themes/trunk/LICENSE
 Template: blockbase
@@ -33,4 +33,4 @@ Egyptian locust illustration from The Naturalist's Miscellany (1789-1813) by Geo
 License: CC0
 Source: https://www.rawpixel.com/image/386633/free-illustration-image-insect-egyptian-locust
 Included in theme screenshot.
-*/
+*/