XF 2.0 How do I create hashes.json for changes in an addon

ibaker

Well-known member
I paid a developer to create an addon for me and I have made changes to within the addon itself so the hashes.json file is all wrong. So I was wondering if someone could spell out for me in very simple terms how can I create a hashes.json file for the addon that now has the changes in it. Please please in very simple terms like step 1 do this, step 2 do that

Your help is appreciated
 
  1. On the server where your XenForo installation is, use your shell (SSH or if it's running locally then through your OS' command line interface e.g. Terminal on macOS or Command Prompt/Powershell on Windows) to change the directory to the root of your XF installation, e.g. something like cd /home/sites/blah/public_html
  2. Type the command: php cmd.php xf-dev:build-release ADDONID (replace ADDONID with the ID of the add-on).
  3. This will write out a ZIP file to, e.g. src/addons/ADDONID/_releases.
  4. Extract the contents of the ZIP file and within it there will be a hashes.json file in the path upload/src/addons/ADDONID/hashes.json.
 
Type the command: php cmd.php xf-dev:build-release ADDONID (replace ADDONID with the ID of the add-on).
Where can I find the correct ID of an addon?

Second, I get this error:
Command "xf-dev:build-release" is not defined.
 
Very funny:

<b>Parse error</b>: syntax error, unexpected T_STRING in <b>/homepages/forum.com/cmd.php</b> on line <b>14</b><br />
 
Thank you for this tid bit.
Used this website - https://emn178.github.io/online-tools/sha256.html to get all mine fixed fairly quickly.

This works brilliantly.

Download the file that is causing the issue to your local workstation. Check for bad stuff. If none, go to the github site and drag the file into the window.

Oh, and BE SURE to use the "File Hash SHA256" instead of the simple hash. Duh, took me a beat to find why this did not fix my problem.

Anyway, open the hash.json file and find the file name and hash in the list. Replace the hash. Upload, and all should be good.

Thanks @2faroffroad !
 
Top Bottom