Updated 063 Proposed Collaborative Workflow in JCB (markdown)

Amigo 2019-11-01 16:31:44 +02:00
parent 96d2cdaefc
commit 5a1a130ca0
1 changed files with 5 additions and 10 deletions

@ -26,7 +26,7 @@ We've also started working on an area called servers. In which we have added the
[00:04:14](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h04m14s)
There was a discussion between me and one of my coworkers and some others from the community which ended up in saying that this is a premium feature. Although we have put it on the back burner, I am still thinking about taking this and making this a reality. [00:04:42](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h04m42s)
So part of doing that is to take a specific area of JCB and that area is the import of JCB packages. To improve this area, synchronization will be nothing else but a JCB package traveling from one to the other, updating each other automatically. To achieve that I started working on a feature which is available in the latest version 2.7 9, [00:05:17](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h05m17s) 'Development Method'. We have called it, the Default, and it is the way that it always used to work. Then there's Expansion. There's a tutorial about this which really explains that you can select specific components that you've developed. Then on the frequency of the [00:05:39](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h05m39s) Cronjob it will build and install this project automatically. That is the first step needing to make that connection between two projects possible. I'm literally talking about different Joomla websites, one being offline and one being online. One that's online to serve like a hub, then everybody that's offline would be pushing the changes to this online and pulling again from it. That is the long-term aim.
So part of doing that is to take a specific area of JCB and that area is the import of JCB packages. To improve this area, synchronization will be nothing else but a JCB package traveling from one to the other, updating each other automatically. To achieve that I started working on a feature that is available in the latest version 2.7 9, [00:05:17](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h05m17s) 'Development Method'. We have called it, the Default, and it is the way that it always used to work. Then there's Expansion. There's a tutorial about this which really explains that you can select specific components that you've developed. Then on the frequency of the [00:05:39](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h05m39s) Cronjob it will build and install this project automatically. That is the first step needing to make that connection between two projects possible. I'm literally talking about different Joomla websites, one is offline and one is online. One that's online to serve like a hub, then everybody that's offline would be pushing the changes to this online and pulling again from it. That is the long-term aim.
### Team Of Developers
@ -72,19 +72,19 @@ The first thing you do is you go back to your component where it's installed on
[00:12:49](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h12m49s)
I need to create those files in my local developing environment. I'll do that via command line. First, I will make a directory, then I'm going to change that directory. In that directory I'm going to create another directory called, 'Git', change that directory as well. This is the directory where my components are going to be placed. At the moment if we look inside of this directory, there is really nothing showing. The first time I will compile a component [00:13:34](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h13m34s) and I will say to the compiler to add my files to the Git repository. It's going to create a folder with all the code inside it automatically. You will remember that I cloned this repository on GitHub Joomla Questions And Answers. [00:13:54](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h13m54s) To continue I need to get the JCB package for this installed into my JCB program. The way this is done, we go to the JCB package area and select the Questions And Answers package. We will get the package. [00:14:18](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h14m18s) We add the key. At the moment there are not any components on this install. It's fine to leave '_Merge_' to 'Yes'. I'm going to Force Local Update of anything. We can just check again that it is the right package. It's the correct package. The checksum you can read. There is a checksum for the package and at the moment it seems that everything is fine, you can make a final check by clicking this link(https://raw.githubusercontent.com/vdm.io) [00:14:50](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h14m50s) and make sure that this number is the same as the one seeing on the page. All is good, click continue. There you have it. We've the component in our system.
I need to create those files in my local developing environment. I'll do that via command line. First, I will make a directory, then I'm going to change that directory. In that directory I'm going to create another directory called, 'Git', change that directory as well. This is the directory where my components are going to be placed. At the moment if we look inside this directory, there is really nothing showing. The first time I will compile a component [00:13:34](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h13m34s) and I will say to the compiler to add my files to the Git repository. It's going to create a folder with all the code inside it automatically. You will remember that I cloned this repository on GitHub Joomla Questions And Answers. [00:13:54](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h13m54s) To continue I need to get the JCB package for this installed into my JCB program. The way this is done, we go to the JCB package area and select the Questions And Answers package. We will get the package. [00:14:18](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h14m18s) We add the key. At the moment there are not any components on this install. It's fine to leave '_Merge_' to 'Yes'. I'm going to Force Local Update of anything. We can just check again that it is the right package. It's the correct package. The checksum you can read. There is a checksum for the package and at the moment it seems that everything is fine, you can make a final check by clicking this link(https://raw.githubusercontent.com/vdm.io) [00:14:50](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h14m50s) and make sure that this number is the same as the one seeing on the page. All is good, click continue. There you have it. We've the component in our system.
### Compile For The First Time - Add To Repository Folder - Yes
[00:15:07](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h15m07s)
If I compile it for the first time, let me show you that there still is no file whatsoever. I'm going to compile this component and I'm going to say: Add to Repository Folder. [00:15:30](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h15m30s) "Should the zipped package of the component be moved to the local repository folder." We have already set the path for this. It will work. If we say 'Yes' and then compile, we will see that it has been done and it's all well. We can go back to the folder and check it again. We will see that there is a folder with its exact name. If we change it in that folder, we'll see that it is at the moment ls-la. [00:16:03](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h16m03s) There's no Git information. This folder is a source code without any Git connected to it. What we are going to do at this point, we are going to connect your forked version that you have on GitHub [00:16:22](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h16m22s) to this folders. And from now on if you make a change to the component, you'll have to push the changes in this folder to the GitHub Repository.
If I compile it for the first time, let me show you that there still is no file whatsoever. I'm going to compile this component and I'm going to say: Add to Repository Folder. [00:15:30](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h15m30s) "Should the zipped package of the component be moved to the local repository folder." We have already set the path for this. It will work. If we say 'Yes' and then compile, we will see that it has been done and it's all well. We can go back to the folder and check it again. We will see that there is a folder with its exact name. If we change it in that folder, we'll see that it is at the moment ls-la. [00:16:03](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h16m03s) There's no Git information. This folder is a source code without any Git connected to it. What we are going to do at this point, we are going to connect the forked version that you have on GitHub [00:16:22](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h16m22s) to these folders. And from now on if you make a change to the component, you'll have to push the changes in this folder to the GitHub Repository.
### Use Following Commands To Link GitHub To Each Other
[00:16:35](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h16m35s)
The way to link the two to each other, is to use the following commands. Making sure that you're in the correct directory `com_questions_and_answers_joomla_3`. You can run the command `rm - fR *`. I know you might say why? We did compile it and now delete everything. Well, unfortunately [00:17:10](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h17m10s) this is the only way to do this without difficulty. First, you need to get the information down from GitHub. You might ask why didn't we just do that first? Because it seemed easier to just let JCB build the folder for you and can use the folder. I'm going to wipe out all the files, if we check there now, no file is there.
The way to link the two to each other is to use the following commands. Making sure that you're in the correct directory `com_questions_and_answers_joomla_3`. You can run the command `rm - fR *`. I know you might say why? We did compile it and now delete everything. Well, unfortunately [00:17:10](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h17m10s) this is the only way to do this without difficulty. First, you need to get the information down from GitHub. You might ask why didn't we just do that first? Because it seemed easier to just let JCB build the folder for you and can use the folder. I'm going to wipe out all the files, if we check there now, no file is there.
### Starting By Pulling Files Down from GitHub - git init - git remote add orgin
@ -169,12 +169,7 @@ Here in JCB we click on Questions and Answers and there is one little snag here
[00:41:35](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h41m35s)
We now have this package in this folder and we will need to move it into the repository which is also the one we have synchronized with our forked version. I have it here. I'm going to cut [00:41:54](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h41m54s) it from my temporal folder in my Joomla website to this repository, paste it in. It is going to ask if it should be replace and we're going to say: 'Yes' replace it. There we go, we've the package updated. We can go back to command line and we do: [00:42:17](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h42m17s) `git diff`. We'll see that the file had changed. We also need to run the hash file to update it. Now type in: `git status`. [00:42:36](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h42m36s) We'll see if those files have been updated.
The ID of that could possibly be useful here. It's just to give a heads up and validate that you did first contribute the code to the actual Joomla Component and it was accepted. [00:43:08](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h43m08s) This is the change to the package which also needs to be looked at. In our case this is the pull request, the URL. I think we are going to use that in our commit message. Use the same commit message. It should look something like this: `git commit -am"Update the component with the improvements made in JCB ref.."` [00:43:45](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h43m45s) then the repositories username or organisation name. The repository name with this `#1`, since the pull request was number one. We will submit that and push those changes to our version of the repository.>>>>>>>>>>
The ID of that could possibly be useful here. It's just to give a heads up and validate that you did first contribute the code to the actual Joomla Component and it was accepted. [00:43:08](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h43m08s) This is the change to the package which also needs to be looked at. In our case this is the pull request, the URL. I think we are going to use that in our commit message. Use the same commit message. It should look something like this: `git commit -am"Update the component with the improvements made in JCB ref.."` [00:43:45](https://www.youtube.com/watch?v=zlhFyrCGWik&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&index=63&t=00h43m45s) then the repositories username or organisation name. The repository name with this `#1`, since the pull request was number one. We will submit that and push those changes to our version of the repository.
### Going back To GitHub - Push Was Submitted - Will See A Link