浏览代码

Version Bump

Jason Crist 3 年之前
父节点
当前提交
613b59347a
共有 1 个文件被更改,包括 12 次插入7 次删除
  1. 12 7
      theme-utils.mjs

+ 12 - 7
theme-utils.mjs

@@ -106,7 +106,7 @@ async function pushButtonDeploy(repoType) {
 		let hash = await getLastDeployedHash();
 		let diffUrl;
 
-		await versionBumpThemes();
+		let thingsWentBump = await versionBumpThemes();
 
 		let changedThemes = await getChangedThemes(hash);
 
@@ -123,7 +123,9 @@ async function pushButtonDeploy(repoType) {
 		let diffId = diffUrl.split('a8c.com/')[1];
 
 		//push changes (from version bump)
-		await executeCommand('git push');
+		if( thingsWentBump ){
+			await executeCommand('git push');
+		}
 
 		await tagDeployment({
 			hash: hash,
@@ -343,12 +345,15 @@ async function versionBumpThemes() {
 		await executeCommand(`npm version patch --no-git-tag-version`);
 	}
 
-	if (versionBumpCount > 0) {
-		console.log('commiting version-bump');
-		await executeCommand(`
-			git commit -a -m "Version Bump";
-		`, true);
+	if (versionBumpCount = 0 ) {
+		return false;
 	}
+
+	console.log('commiting version-bump');
+	await executeCommand(`
+		git commit -a -m "Version Bump";
+	`, true);
+	return true;
 }
 
 function getThemeMetadata(styleCss, attribute) {