Apiato: How to update Apiato to new version?

Created on 12 Oct 2017  路  4Comments  路  Source: apiato/apiato

When Apiato fix some bugs how do I patch it.

Question

Most helpful comment

Hey there,

for major versions, apiato provides an Upgrade Guide that walks you "step by step" through this process.

However, if you would like to use the "bleeding edge" version (aka dev-master branch) of apiato, you need to merge all changes (manually or with the help of GIT). I, therefore, do the following stuff:
1) add another remote to your GIT Repository (e.g., in SourceTree or whatever GIT client you are using) and call it apiato. Let it point to this apiato/apiato repository!
2) FETCH from the apiato/apiato repository
3) MERGE from apiato/dev-master to your current local develop branch
4) resolve all merge-conflicts (may be complicated and time consuming!)
5) run tests
6) cross fingers and hope you did not break your application
7) continue developing

I highly suggest to not use the "bleeding edge" version, unless you really (and i literary mean really) know what you are doing!

Hope this helps,
Best, Johannes

All 4 comments

Hey there,

for major versions, apiato provides an Upgrade Guide that walks you "step by step" through this process.

However, if you would like to use the "bleeding edge" version (aka dev-master branch) of apiato, you need to merge all changes (manually or with the help of GIT). I, therefore, do the following stuff:
1) add another remote to your GIT Repository (e.g., in SourceTree or whatever GIT client you are using) and call it apiato. Let it point to this apiato/apiato repository!
2) FETCH from the apiato/apiato repository
3) MERGE from apiato/dev-master to your current local develop branch
4) resolve all merge-conflicts (may be complicated and time consuming!)
5) run tests
6) cross fingers and hope you did not break your application
7) continue developing

I highly suggest to not use the "bleeding edge" version, unless you really (and i literary mean really) know what you are doing!

Hope this helps,
Best, Johannes

ok.. to clarify things, i add some more details on how I keep my own application in sync with apiato/apiato.
For now, I will call my API application..

1) install a preferred Git Client - I use SourceTree in my dev setup, but you can use GitHub Desktop or any other Git Client as well..
2) I asume that you already have a repository where you push your application to. This is typically pushed to the origin remote.
3) Add a new remote apiato to the project and let it point to https://github.com/apiato/apiato
4) In the REMOTES navigation part of the application you should have 2 remotes (origin and apiato).
5) right-click the apiato one and select Fetch from apiato in order to update the Graph and show the latest commits (note that this step will not pull and not merge these commits into your branch!)
6) In the graph-view of your git client you should see a apiato/master tag somewhere with the latest commits in a different branch..
7) select your latest branch (e.g., develop) and branch from there.. We create a new branch merger, where we pull all the changes from apiato/master and resolve all conflicts.
8) if you have created the new merger branch, switch to this branch (e.g., by double-clicking it)
9) then merge the latest apiato/master commit into your merger branch (e.g., in SourceTree simply select the commit and select MERGE from the menu)
10) You may need to manually resolve some merge-conflicts (e.g., if some files were deleted)
11) !! TEST THE APPLICATION ON THE MERGER BRANCH !!
12) !! REALLY - TEST THE APPLICATION !!
13) Tweak your application in order to fix possible bugs (you have tested your application, right?!) and adjust your application to new apiato styleguides (e.g., use the new Apiato::call(...) instead of $this->call(...) or whatever)
14) Merge from merger back to develop branch
15) Hope that everything works as expected


If you want to merge additional changes, you can simply start from step 5 again (FETCH from apiato) to get the latest commits and then start merging again..

I hope, this clarifies issues on your side..
Cheers,
Johannes

I personally was running in to an error in SourceTree and the Command Line when following these steps. In particular when I reached step 9. The error was:

fatal: refusing to merge unrelated histories

The only way around was for me to run the following command:

git merge apiato/master --allow-unrelated-histories

You of course need to first checkout the branch you wish to update. The merge then ran fine.

@justinatack I'm writing a documentation about this now, will be released very soon with the new apiato release. Basically an updated version of this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kk86bioinfo picture kk86bioinfo  路  6Comments

nmrgt picture nmrgt  路  7Comments

autaut03 picture autaut03  路  6Comments

phuocnt0612 picture phuocnt0612  路  3Comments

Mahmoudz picture Mahmoudz  路  7Comments