umbraco / Umbraco.Deploy.Issues

1 stars 0 forks source link

When renaming the UmbracoProject folder a githook error occurs #124

Closed FransdeJong closed 2 years ago

FransdeJong commented 2 years ago

When you rename the UmbracoProject folder on a cloud project an error occurs. Renaming the folder should be possible on Cloud: https://our.umbraco.com/documentation/umbraco-cloud/Set-up/Working-With-Visual-Studio/

The error I get in Git is: .git\hooks\post-merge: line 2: src/UmbracoProject/umbraco/Deploy/deploy: No such file or directory

AndyButland commented 2 years ago

HI @FransdeJong - Umbraco Deploy for Cloud creates this git hook when it's first run locally. Once it's created though, it doesn't try to update it. In your case it needs to, as the folder has changed, but I think it's probably safer we don't try to update this automatically. Creating an empty hook that doesn't already exist is OK, but there's a chance with rewriting that we affect something that a customer has added for other reasons.

It's fairly straightforward to correct manually. Within your locally cloned project there's a .git folder, and within that one called hooks, and within that a text file called post-merge. If you open this up with a text editor you'll see the default contents of:

#!/bin/sh
echo > src/UmbracoProject/umbraco/Deploy/deploy

And can update the path to where you now have your umbraco/Deploy/ folder.

I'll create a docs PR to ensure this is added to the page you have linked to.

FransdeJong commented 2 years ago

Maybe this can be added to the forementioned documentation page?

AndyButland commented 2 years ago

PR for docs linked above.