瀏覽代碼

Remove/svn commands (and other utility housecleaning) (#5440)

* Removed SVN versions of deploy actions

* Removed (unused) sandbox.sh utility

* Refactored pushToSandbox() to sync in the same manner as selective (changed) syncing

* renamed zip npm target to fit the other script names. Added deploy:theme as npm script

* Removed unused sandbox-git.sh
Jason Crist 3 年之前
父節點
當前提交
320fb6c82f
共有 4 個文件被更改,包括 37 次插入431 次删除
  1. 6 14
      package.json
  2. 0 125
      sandbox-git.sh
  3. 0 153
      sandbox.sh
  4. 31 139
      theme-utils.mjs

+ 6 - 14
package.json

@@ -6,17 +6,9 @@
 	"license": "GPL-2.0",
 	"prettier": "@wordpress/prettier-config",
 	"scripts": {
-		"sandbox:pull": "./sandbox.sh pull",
-		"sandbox:push": "./sandbox.sh push",
-		"sandbox:push:ignore": "./sandbox.sh push --ignore",
-		"sandbox:push:force": "./sandbox.sh push --force",
-		"sandbox:watch": "chokidar '**/*' -i '*/node_modules' -i '.git' -c './sandbox.sh push --ignore' --initial",
-		"sandbox:clean:git": "node ./theme-utils.mjs clean-sandbox-git",
-		"sandbox:clean:svn": "node ./theme-utils.mjs clean-sandbox-svn",
-		"sandbox:clean-premium:git": "node ./theme-utils.mjs clean-premium-sandbox-git",
-		"sandbox:clean-premium:svn": "node ./theme-utils.mjs clean-premium-sandbox-svn",
-		"sandbox:clean-all:git": "node ./theme-utils.mjs clean-all-sandbox-git",
-		"sandbox:clean-all:svn": "node ./theme-utils.mjs clean-all-sandbox-svn",
+		"sandbox:clean": "node ./theme-utils.mjs clean-sandbox",
+		"sandbox:clean-premium": "node ./theme-utils.mjs clean-premium-sandbox",
+		"sandbox:clean-all": "node ./theme-utils.mjs clean-all-sandbox",
 		"local:clean": "git reset --hard HEAD; git clean -fd",
 		"batch:install": "./theme-batch-utils.sh install-dependencies",
 		"batch:build": "./theme-batch-utils.sh build-all",
@@ -26,10 +18,10 @@
 		"deploy:push:all": "node ./theme-utils.mjs push-to-sandbox",
 		"deploy:push:changes": "node ./theme-utils.mjs push-changes-to-sandbox",
 		"deploy:push:premium": "node ./theme-utils.mjs push-premium-to-sandbox",
-		"deploy:git": "node ./theme-utils.mjs push-button-deploy-git",
-		"deploy:svn": "node ./theme-utils.mjs push-button-deploy-svn",
+		"deploy": "node ./theme-utils.mjs push-button-deploy",
 		"deploy:preview": "node ./theme-utils.mjs deploy-preview",
-		"build:zip": "node ./theme-utils.mjs build-com-zip",
+		"deploy:theme": "node ./theme-utils.mjs deploy-theme",
+		"deploy:zip": "node ./theme-utils.mjs build-com-zip",
 		"build:variations": "node ./variations/build-variations.mjs"
 	},
 	"devDependencies": {

+ 0 - 125
sandbox-git.sh

@@ -1,125 +0,0 @@
-#!/bin/bash
-
-SANDBOX_PUBLIC_THEMES_FOLDER='/home/wpdev/public_html/wp-content/themes/pub';
-
-# Display the status of the repo on sandbox
-if [[ $1 == "status" ]]; then
-ssh -TA wpcom-sandbox << EOF 
-  cd '$SANDBOX_PUBLIC_THEMES_FOLDER'; 
-  git status;
-  echo
-EOF
-
-# Clean the sandbox.
-# checkout origin/trunk and ensure it's up-to-date.
-# Remove any other changes.
-elif [[ $1 == "clean" ]]; then
-ssh -TA wpcom-sandbox << EOF 
-  cd '$SANDBOX_PUBLIC_THEMES_FOLDER'; 
-  git reset --hard HEAD;
-  git clean -fd;
-  git checkout trunk;
-  git pull;
-  echo
-EOF
-
-# Add the public github as a remote to your sandbox
-# This is useful to checkout branches from github directly to your sandbox
-elif [[ $1 == "add-github-remote" ]]; then
-ssh -TA wpcom-sandbox << EOF 
-  cd '$SANDBOX_PUBLIC_THEMES_FOLDER'; 
-  git remote add github git@github.com:Automattic/themes.git
-  git fetch github
-  echo
-EOF
-
-# Add the sandbox as a remote to your local
-# This doesn't seem to actually work right now...
-# This allows you to refer to the github as "origin" and your sandbox as "sandbox"
-# Note that for this to work your ~/.ssh/config must have 
-# Host wpcom-sandbox
-#     User wpdev
-#     HostName SANDBOXURL.wordpress.com
-#     ForwardAgent yes
-elif [[ $1 == "add-sandbox-remote" ]]; then
-git remote add sandbox wpdev@wpcom-sandbox:/home/wpdev/public_html/wp-content/themes/pub/.git
-
-# Switch the sandbox to a given github branch.
-# Defaults to current branch if not provided.
-elif [[ $1 == "checkout-branch" ]]; then
-  if [[ -z $2 ]]; then
-    BRANCH_NAME=$(git symbolic-ref --short HEAD)
-  else
-    BRANCH_NAME=$2;
-  fi
-
-ssh -TA wpcom-sandbox << EOF 
-  cd '$SANDBOX_PUBLIC_THEMES_FOLDER'
-  git fetch
-  git checkout github/$BRANCH_NAME
-  echo
-EOF
-
-# First ensure that the local and sandbox are on the same branch.
-# Then push whatever has changed in the local branch to the sandbox via rsync.
-# This isn't going to work because the public repo (github) and private repo (a8c)
-# don't have common ancestry
-elif [[ $1 == "push-local-diff" ]]; then
-ssh -TA wpcom-sandbox << EOF 
-  echo '#TODO: Everything';
-EOF
-
-elif [[ $1 == "push" ]]; then
-rsync -av --no-p --no-times --exclude-from='.sandbox-ignore' ./ wpcom-sandbox:$SANDBOX_PUBLIC_THEMES_FOLDER/
-
-elif [[ $1 == "create-diff" ]]; then
-
-#TODO: Do some fancy git stuff to build the commit message
-commit_message="Deploy Themes [THEME UMBRELLA PROJECT VERSION] to wpcom
-   
-Summary:
-This is a test.  Please ignore this diff
-This should reflect all of the Pull Requests between THIS BRANCH and TRUNK (stating at the point of diversion)
-
-Test Plan: Execute Smoke Test
-   
-Reviewers:
-   
-Subscribers:
-"
-
-ssh -TA wpcom-sandbox << EOF 
-  cd $SANDBOX_PUBLIC_THEMES_FOLDER
-  git branch -D deploy
-  git checkout -b deploy
-  git add --all
-  git commit -m "$commit_message"
-  arc diff --create --verbatim
-EOF
-#TODO: Pull the Phabricator URL from the output above
-# Open phabricator URL in my browser
-# Add Phabricator URL to the PR I'm working with (as a comment) ???
-
-elif [[ $1 == "checkout-diff" ]]; then
-diff_id=$2
-ssh -TA wpcom-sandbox << EOF 
-  cd $SANDBOX_PUBLIC_THEMES_FOLDER
-  arc patch $diff_id
-EOF
-
-
-elif [[ $1 == "deploy-diff" ]]; then
-ssh -TA wpcom-sandbox << EOF 
-  cd $SANDBOX_PUBLIC_THEMES_FOLDER
-  arc land --onto trunk --preview
-EOF
-
-# Clone the sandbox here.
-# I don't think you would ever actually do this one... if you have this script then you've already cloned the repo from SOMEWHERE.
-# It's mostly here as a reference.
-elif [[ $1 == "clone" ]]; then
-git clone wpdev@wpcom-sandbox:/home/wpdev/public_html/wp-content/themes/pub/.git .
-
-
-# All Done
-fi

+ 0 - 153
sandbox.sh

@@ -1,153 +0,0 @@
-#!/bin/bash
-
-# Load the configuration file
-FILE=.sandbox-config
-
-# Create the configuration file if it does not exist
-if ! test -f "$FILE"; then
-    echo "No sandbox config exists."
-
-    echo "What is the sandbox user? [wpdev]"
-    read SANDBOX_USER
-    SANDBOX_USER="${SANDBOX_USER:-wpdev}"
-
-    echo "What is the sandbox location?"
-    read SANDBOX_LOCATION
-    [[ -z "$SANDBOX_LOCATION" ]] && { echo "Come back when you know where your sandbox is." ; exit 1; }
-
-    echo "What is the themes folder on the sandbox? [/home/$SANDBOX_USER/public_html/wp-content/themes/pub]"
-    read SANDBOX_PUBLIC_THEMES_FOLDER
-    SANDBOX_PUBLIC_THEMES_FOLDER="${SANDBOX_PUBLIC_THEMES_FOLDER:-/home/$SANDBOX_USER/public_html/wp-content/themes/pub}"
-
-    echo "Writing $FILE"
-    /bin/cat <<EOM >$FILE
-SANDBOX_USER="$SANDBOX_USER"
-SANDBOX_LOCATION="$SANDBOX_LOCATION"
-SANDBOX_PUBLIC_THEMES_FOLDER="$SANDBOX_PUBLIC_THEMES_FOLDER"
-EOM
-
-fi
-
-source $FILE 
-
-if [[ $1 == "clean" ]]; then
-ssh -T $SANDBOX_USER@$SANDBOX_LOCATION << EOF 
-  cd '$SANDBOX_PUBLIC_THEMES_FOLDER'; 
-  svn revert -R .;
-  svn cleanup --remove-unversioned;
-  svn up;
-EOF
-
-elif [[ $1 == "pull" ]]; then
-
-  cmd="rsync -av --no-p --no-times --exclude-from='.sandbox-ignore' --exclude=$ignore_string $SANDBOX_USER@$SANDBOX_LOCATION:$SANDBOX_PUBLIC_THEMES_FOLDER/ ./ "
-  eval $cmd
-
-elif [[ $1 == "push" ]]; then
-  if [[ $2 != '--ignore' ]]; then
-    git remote update
-  fi
-  current_branch=$(git branch --show-current)
-  hash1=$(git rev-parse origin/trunk)
-  hash2=$(git merge-base origin/trunk ${current_branch})
-  files_to_ignore=''
-
-  if [ ! "${hash1}" = "${hash2}" ]; then
-
-  if [[  $2 != '--force' && $2 != '--ignore' ]]; then
-
-    echo "!! ----------------------------------------------------------- !!
-
-    The branch you are pushing is not up-to-date with /trunk.
-    This may result in out-of-date resources on your sandbox.
-    How do you wish to proceed?
-
-    1 - Nevermind, I'll merge/rebase my branch first.
-        (This option is the safest.)
-
-    2 - Go ahead, I know what I'm doing. I want the old files on my sandbox.
-        (This is a good option if you are evaluating an old branch for breakage
-         and want to have the sandbox reflect exactly the way it was back then.)
-
-    3 - IGNORE the files changed in /trunk since this branch diverged.
-        (This is great during development so that you don't have to keep your
-         branch completely up-to-date with /trunk and MIGHT be safe for pushing
-         a build.  Use at your own risk.)
-
-!! ----------------------------------------------------------- !!
-How do you wish to proceed? [1]"
-    read sync_type 
-    fi
-
-    if [[ $sync_type = "3" || $2 = '--ignore' ]]; then
-      echo "building ignore list based on divergence"
-
-      # These are the files that were changed in trunk since this branch diverged
-      files_to_ignore=$(git diff ${hash2} origin/trunk --name-only)
-      files_to_ignore=($files_to_ignore)
-
-      # These are the files changed in THIS branch since it diverged
-      # EVEN IF they changed in trunk we STILL want to include them in our sync
-      committed_files_to_include=$(git diff ${hash2} ${current_branch} --name-only)
-      committed_files_to_include=($committed_files_to_include)
-
-      # Remove from the files_to_ignore collection anything found in committed_files_to_include
-      for target in "${committed_files_to_include[@]}"; do
-        for i in "${!files_to_ignore[@]}"; do
-          if [[ ${files_to_ignore[i]} = $target ]]; then
-            unset 'files_to_ignore[i]'
-          fi
-        done
-      done
-
-      # These are the changes we have made but haven't committed yet
-      # EVEN IF they changed in trunk we STILL want to include them in our sync
-      uncommitted_files_to_include=$(git diff HEAD --name-only)
-      uncommitted_files_to_include=($uncommitted_files_to_include)
-
-      # Remove from the files_to_ignore collection anything found in the uncommitted_files_to_include
-      for target in "${uncommitted_files_to_include[@]}"; do
-        for i in "${!files_to_ignore[@]}"; do
-          if [[ ${files_to_ignore[i]} = $target ]]; then
-            unset 'files_to_ignore[i]'
-          fi
-        done
-      done
-
-
-      # Build a string based on files_to_ignore to pass to rsync
-      ignore_string=""
-      for target in "${files_to_ignore[@]}"; do
-        ignore_string="${ignore_string}${target}','"
-      done
-      ignore_string=${ignore_string::${#ignore_string}-2}
-      ignore_string="{'$ignore_string}"
-
-    elif [[ $sync_type = "2" || $2 = '--force' ]]; then
-      echo "syncing to sandbox exactly what you have here"
-
-    else
-      echo "Exiting.  Clean yourself up and come back later."
-      exit 0;
-
-    fi
-
-  fi
-
-  # Determine which files have been removed from the repository (or renamed) as of this head, within the past three months, according to git
-  files_to_delete=$(git log --format=format:"" --name-only --since="last three months" -M100% --diff-filter=D HEAD)
-
-  # Determine which files have been removed locally but not committed as a change
-  uncommitted_files_to_delete=$(git diff HEAD --name-only --diff-filter=D)
-
-  # Remove all of those files from the destination.  (Note, if a file has since been re-added to the repo it will be uploaded in the next step)
-  remove_command="ssh $SANDBOX_USER@$SANDBOX_LOCATION 'cd $SANDBOX_PUBLIC_THEMES_FOLDER && rm -f $files_to_delete $uncommitted_files_to_delete'"
-  eval $remove_command;
-
-  cmd="rsync -av --no-p --no-times --exclude-from='.sandbox-ignore' --exclude=$ignore_string ./ $SANDBOX_USER@$SANDBOX_LOCATION:$SANDBOX_PUBLIC_THEMES_FOLDER/"
-  eval $cmd
-
-else 
-  echo 'No known command given. [clean, push]'
-
-fi

+ 31 - 139
theme-utils.mjs

@@ -14,15 +14,15 @@ const premiumThemes = [ 'videomaker', 'videomaker-white' ];
 	let args = process.argv.slice(2);
 	let command = args?.[0];
 	switch (command) {
-		case "push-button-deploy-git": return pushButtonDeploy('git');
-		case "clean-sandbox-git": return cleanSandboxGit();
-		case "clean-premium-sandbox-git": return cleanPremiumSandboxGit();
-		case "clean-all-sandbox-git": return cleanAllSandboxGit();
+		case "push-button-deploy": return pushButtonDeploy();
+		case "clean-sandbox": return cleanSandbox();
+		case "clean-premium-sandbox": return cleanPremiumSandbox();
+		case "clean-all-sandbox": return cleanAllSandbox();
 		case "push-to-sandbox": return pushToSandbox();
 		case "push-changes-to-sandbox": return pushChangesToSandbox();
 		case "push-premium-to-sandbox": return pushPremiumToSandbox();
 		case "version-bump-themes": return versionBumpThemes();
-		case "land-diff-git": return landChangesGit(args?.[1]);
+		case "land-diff": return landChanges(args?.[1]);
 		case "deploy-preview": return deployPreview();
 		case "deploy-theme": return deployThemes([args?.[1]]);
 		case "build-com-zip": return buildComZip([args?.[1]]);
@@ -59,7 +59,6 @@ async function deployPreview() {
 
 /*
  Execute the first phase of a deployment.
- Leverages git on the sandbox.
 	* Gets the last deployed hash from the sandbox
 	* Version bump all themes have have changes since the last deployment
 	* Commit the version bump change to github
@@ -70,7 +69,7 @@ async function deployPreview() {
 	* Open the Phabricator Diff in your browser
 	* Create a tag in the github repository at this point of change which includes the phabricator link in the description
 */
-async function pushButtonDeploy(repoType) {
+async function pushButtonDeploy() {
 
 	console.clear();
 	let prompt = await inquirer.prompt([{
@@ -84,9 +83,6 @@ async function pushButtonDeploy(repoType) {
 		return;
 	}
 
-	if (repoType != 'svn' && repoType != 'git' ) {
-		return console.log('Specify a repo type to use push-button deploy');
-	}
 
 	let message = await checkForDeployability();
 	if (message) {
@@ -94,12 +90,7 @@ async function pushButtonDeploy(repoType) {
 	}
 
 	try {
-		if (repoType === 'git' ) {
-			await cleanSandboxGit();
-		}
-		else {
-			await cleanSandboxSvn();
-		}
+		await cleanSandbox();
 
 		//build variations
 		console.log('Building Variations');
@@ -126,8 +117,6 @@ async function pushButtonDeploy(repoType) {
 		}
 
 		let hash = await getLastDeployedHash();
-		let diffUrl;
-
 		let thingsWentBump = await versionBumpThemes();
 
 		if( thingsWentBump ){
@@ -171,12 +160,7 @@ async function pushButtonDeploy(repoType) {
 
 		await updateLastDeployedHash();
 
-		if (repoType === 'git' ) {
-			diffUrl = await createGitPhabricatorDiff(hash);
-		}
-		else {
-			diffUrl = await createSvnPhabricatorDiff(hash);
-		}
+		let diffUrl = await createPhabricatorDiff(hash);
 		let diffId = diffUrl.split('a8c.com/')[1];
 
 
@@ -199,12 +183,7 @@ async function pushButtonDeploy(repoType) {
 			return;
 		}
 
-		if (repoType === 'git' ) {
-			await landChangesGit(diffId);
-		}
-		else {
-			await landChangesSvn(diffId);
-		}
+		await landChanges(diffId);
 
 		let changedPublicThemes = changedThemes.filter( item=> ! premiumThemes.includes( item ) );
 
@@ -296,23 +275,11 @@ async function checkForDeployability(){
 
 /*
  Land the changes from the given diff ID.  This is the "production merge".
- This is the git version of that action.
 */
-async function landChangesGit(diffId){
+async function landChanges(diffId){
 	return executeCommand(`ssh -tt -A ${remoteSSH} "cd ${sandboxPublicThemesFolder}; /usr/local/bin/arc patch ${diffId}; /usr/local/bin/arc land; exit;"`, true);
 }
 
-/*
- Land the changes from the given diff ID.  This is the "production merge".
- This is the svn version of that action.
-*/
-async function landChangesSvn(diffId){
-	return await executeOnSandbox(`
-		cd ${sandboxPublicThemesFolder};
-		svn ci -m ${diffId}
-	`, true );
-}
-
 async function getChangedThemes(hash) {
 	console.log('Determining all changed themes');
 	let themes = await getActionableThemes();
@@ -548,7 +515,7 @@ async function getActionableThemes() {
  checkout origin/trunk and ensure it's up-to-date.
  Remove any other changes.
 */
-async function cleanSandboxGit() {
+async function cleanSandbox() {
 	console.log('Cleaning the Themes Sandbox');
 	await executeOnSandbox(`
 		cd ${sandboxPublicThemesFolder};
@@ -567,7 +534,7 @@ async function cleanSandboxGit() {
  checkout origin/trunk and ensure it's up-to-date.
  Remove any other changes.
 */
-async function cleanPremiumSandboxGit() {
+async function cleanPremiumSandbox() {
 	console.log('Cleaning the Themes Sandbox');
 	await executeOnSandbox(`
 		cd ${sandboxPremiumThemesFolder};
@@ -582,11 +549,10 @@ async function cleanPremiumSandboxGit() {
 }
 /*
  Clean the entire sandbox.
- Assumes sandbox is in 'git' mode
  checkout origin/trunk and ensure it's up-to-date.
  Remove any other changes.
 */
-async function cleanAllSandboxGit() {
+async function cleanAllSandbox() {
 	console.log('Cleaning the Entire Sandbox');
 	let response = await executeOnSandbox(`
 		cd ${sandboxRootFolder};
@@ -601,62 +567,23 @@ async function cleanAllSandboxGit() {
 }
 
 /*
- Clean the theme sandbox.
- Assumes sandbox is in 'svn' mode
- ensure trunk is up-to-date
- Remove any other changes
+  Push exactly what is here (all files) up to the sandbox (with the exclusion of files noted in .sandbox-ignore)
 */
-async function cleanSandboxSvn() {
-	console.log('Cleaning the theme sandbox');
-	await executeOnSandbox(`
-		cd ${sandboxPublicThemesFolder};
-  		svn revert -R .;
-  		svn cleanup --remove-unversioned;
-  		svn up;
-	`, true);
-	console.log('All done cleaning.');
+async function pushToSandbox() {
+	console.log("Pushing All Themes to Sandbox.");
+	let allThemes = await getActionableThemes();
+	allThemes = allThemes.filter( item=> ! premiumThemes.includes( item ) );
+	console.log(`Syncing ${allThemes.length} themes`);
+	for ( let theme of allThemes ) {
+		await pushThemeToSandbox(theme);
+	}
 }
 
-/*
- Clean the premium theme sandbox.
- Assumes sandbox is in 'svn' mode
- ensure trunk is up-to-date
- Remove any other changes
-*/
-async function cleanPremiumSandboxSvn() {
-	console.log('Cleaning the premium theme sandbox');
-	await executeOnSandbox(`
-		cd ${sandboxPremiumThemesFolder};
-  		svn revert -R .;
-  		svn cleanup --remove-unversioned;
-  		svn up;
-	`, true);
-	console.log('All done cleaning.');
-}
-/*
- Clean the entire sandbox.
- Assumes sandbox is in 'svn' mode
- ensure trunk is up-to-date
- Remove any other changes
-*/
-async function cleanAllSandboxSvn() {
-	console.log('Cleaning the entire sandbox');
-	await executeOnSandbox(`
-		cd ${sandboxRootFolder};
-  		svn revert -R .;
-  		svn cleanup --remove-unversioned;
-  		svn up .;
+async function pushThemeToSandbox(theme) {
+	console.log( `Syncing ${theme}` );
+	return executeCommand(`
+		rsync -avR --no-p --no-times --delete -m --exclude-from='.sandbox-ignore' ./${theme}/ wpcom-sandbox:${sandboxPublicThemesFolder}/
 	`, true);
-	console.log('All done cleaning.');
-}
-
-/*
-  Push exactly what is here (all files) up to the sandbox (with the exclusion of files noted in .sandbox-ignore)
-*/
-function pushToSandbox() {
-	executeCommand(`
-		rsync -av --no-p --no-times --exclude-from='.sandbox-ignore' ./ wpcom-sandbox:${sandboxPublicThemesFolder}/
-	`);
 }
 
 /*
@@ -708,17 +635,14 @@ async function pushPremiumToSandbox() {
 */
 async function pushChangesToSandbox() {
 
-	console.log("Pushing Changes to Sandbox.");
+	console.log("Pushing Changed Themes to Sandbox.");
 	let hash = await getLastDeployedHash();
 	let changedThemes = await getChangedThemes(hash);
 	changedThemes = changedThemes.filter( item=> ! premiumThemes.includes( item ) );
 	console.log(`Syncing ${changedThemes.length} themes`);
 
 	for ( let theme of changedThemes ) {
-		console.log( `Syncing ${theme}` );
-		await executeCommand(`
-			rsync -avR --no-p --no-times --delete -m --exclude-from='.sandbox-ignore' ./${theme}/ wpcom-sandbox:${sandboxPublicThemesFolder}/
-		`, true);
+		pushThemeToSandbox(theme);
 	}
 }
 
@@ -747,11 +671,11 @@ Subscribers:
 }
 
 /*
- Create a (git) Phabricator diff from a given hash.
+ Create a Phabricator diff from a given hash.
  Open the phabricator diff in your browser.
  Provide the URL of the phabricator diff.
 */
-async function createGitPhabricatorDiff(hash) {
+async function createPhabricatorDiff(hash) {
 
 	console.log('creating Phabricator Diff');
 
@@ -777,41 +701,9 @@ async function createGitPhabricatorDiff(hash) {
 	return phabricatorUrl;
 }
 
-/*
- Create a (svn) Phabricator diff from a given hash.
- Open the phabricator diff in your browser.
- Provide the URL of the phabricator diff.
-*/
-async function createSvnPhabricatorDiff(hash) {
-	console.log('creating Phabricator Diff');
-
-	const commitTempFileLocation = '/tmp/theme-deploy-comment.txt';
-	const commitMessage = await buildPhabricatorCommitMessageSince(hash);
-
-	console.log(commitMessage);
-
-	const result = await executeOnSandbox(`
-		cd ${sandboxPublicThemesFolder};
-		echo "${commitMessage}" > ${commitTempFileLocation};
-		svn add --force * --auto-props --parents --depth infinity -q;
-		svn status | grep "^\!" | sed 's/^\! *//g' | xargs svn rm;
-		arc diff --create --message-file ${commitTempFileLocation}
-	`, true);
-
-	const phabricatorUrl = getPhabricatorUrlFromResponse(result);
-
-	console.log('Diff Created at: ', phabricatorUrl);
-
-	if(phabricatorUrl) {
-		open(phabricatorUrl);
-	}
-
-	return phabricatorUrl;
-}
-
 /*
  Utility to pull the Phabricator URL from the diff creation command.
- Used by createGitPhabricatorDiff
+ Used by createPhabricatorDiff
 */
 function getPhabricatorUrlFromResponse(response){
 	return response