Managing files using BitBucket

The Marketplace allows automatically file “importing” from your Bitbucket repo directly in the file manager. This will make it easier for you as a developer to push updates to your plugins.

If you are reading these instructions then you must know until now how to login as a Developer and how to add a new Product for sale. The steps below will tell you how to use Bitbuket to automatically “send” new plugin versions to the marketplace Product.

 

Assuming at this point you have the Add new Product page opened and you can see the WPeconomy Release Manager window.

wpecon-release-manager-git

 

The steps below will have to be repeated for all of your existing or new repositories that you will use on the marketplace. Apply the SSH key and POST Hooks first before listing the Product for sale.

 

Step 1: Add SSH Key

 

  1. Log into a repository under an account with administrative rights.
  2. Go to the repository’s settings .
  3. Click Deployment keys from the left hand menu.
  4. Press Add Key.
    The system displays the Add SSH Key dialog.
  5. Enter a label and the SSH Deployment key which you can find below.
  6. Press Add key.
    Bitbucket notifies you via email that a key was added to your account.

 

The Deployment key is:

ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA3p8gWq+BpBSqBNbplr3k+ANJUKj3DIyM6KwXFJOen5HwhtYrckDhbwVU+I8+8MNPj2KI5N4Nqx41t636yqJStwDPP8Ygs7bqLJvGdm8oPfZyei/cmPqsFQ+PnLdkpWUzPjfXzqwmj2ge5sGlTfjfCl5h/N5VZJd031eRqildyZJba8Z3BAk2Jcu+Mf8xUtH/z9VkOEhaMqBQd2pKO3hLSYOq0ZxV79+SGvwI6L6CL3bm/+i1G0J+TxnXIFEDePx/HuAZ6vxohbo7xDJm2irDjKnTKLsqacFq81XKfniLYvwvEeYxne+Q6Ssxmj9vRcpg8Z6lGFuonnvU/3Wu3Eu4SQ==

Step 2: Add POST Hooks

 

  1. Log into a repository under an account with administrative rights.
  2. Go to the repository’s settings .
  3. Click Hooks under Integrations in the left side menu.
  4. In the drop down, select “POST” (you might need to scroll down a bit). Then click Add hook.
  5. Copy the “Post-Receive Hook URL” from your Product “Release Manager” box , and paste it in the URL field inside the “POST” dialog. Click Save.

 

 

At this point in your Bitbucket repository settings you should have the Deployment key and the POST receive HOOK added.

Back in your Products Release manage window you should still have an empty field for Repo URL which you will get from your Repository Overview page in the top right corner as in the image below. Make sure the format is set to SSH.

wpeon-repo-url

 

 

Now the Release manager window should look like the one below:

wpecon-realease-sample

 

 

Step 3: Releasing the Product Files

 

Now that you have all the data added in Bitbucket including the POST and HOOK info and the Repository URL in the Release Manager, all you have to to is Publish/Update your Product and all of the “tags” that your repository has will be compiled into different version of your product. The output should be something like this:

18

 

Once the different plugin version have been compiled all you have to do is click the Release link next to the file version that you want to set as a “latest version”.

For example if your Bitbucket repository has 3 version tags ( 1.0, 1.1, 1.2-dev ) and you want to set 1.1 as the Latest version then hold the mouse next to that version Title and click the Release link.

 

 


 

Q: What if after i publish my Product for sale i tag a new release (1.3) ? How do i make that available ?

A: All you have to do is login to our website using your Developer acount info. Then just Edit the Product for which you just released the new version and in the Release Manager window you should have the new 1.3 version already compiled and all you have to do is click the Release link to set it as “latest”.