Loading code from a local git repository

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Loading code from a local git repository

Tommaso DS
Hello,

I am trying to version a project on git using filetree.
Since I also have some external resources (like images), I would avoid
loading the whole project from the pharo image, because that would
download the external files in a cache directory, thus making them
difficult to reach and update.

My idea is to update the git repository from the commandline, and then
run a script to build the image.

The question then is: is there an easy way to programmatically load a
project from a local directory?

Also, do you have any suggestions for a better workflow to handle this
situation?

Thanks,
Tommaso

Reply | Threaded
Open this post in threaded view
|

Re: Loading code from a local git repository

Sven Van Caekenberghe-2
Just place the repository in a separate directory from the other stuff, like

  https://github.com/svenvc/zinc

No ?

> On 28 Jul 2015, at 12:42, Tommaso Dal Sasso <[hidden email]> wrote:
>
> Hello,
>
> I am trying to version a project on git using filetree.
> Since I also have some external resources (like images), I would avoid
> loading the whole project from the pharo image, because that would
> download the external files in a cache directory, thus making them
> difficult to reach and update.
>
> My idea is to update the git repository from the commandline, and then
> run a script to build the image.
>
> The question then is: is there an easy way to programmatically load a
> project from a local directory?
>
> Also, do you have any suggestions for a better workflow to handle this
> situation?
>
> Thanks,
> Tommaso
>


Reply | Threaded
Open this post in threaded view
|

Re: Loading code from a local git repository

fstephany
In reply to this post by Tommaso DS
As Sven mentionned it, you can simply put your filetree files in a subdirectory.
You can have a look at https://github.com/fstephany/hello-pharo It's a bit outdated but it will give you the idea.

On Tue, Jul 28, 2015 at 12:42 PM, Tommaso Dal Sasso <[hidden email]> wrote:
Hello,

I am trying to version a project on git using filetree.
Since I also have some external resources (like images), I would avoid
loading the whole project from the pharo image, because that would
download the external files in a cache directory, thus making them
difficult to reach and update.

My idea is to update the git repository from the commandline, and then
run a script to build the image.

The question then is: is there an easy way to programmatically load a
project from a local directory?

Also, do you have any suggestions for a better workflow to handle this
situation?

Thanks,
Tommaso


Reply | Threaded
Open this post in threaded view
|

Re: Loading code from a local git repository

Thierry Goubier

You can also add a makefile to build the pharo image in the git repository. I usually have a src/pharo packages build/Makefile structure.

Thierry

Le 28 juil. 2015 1:14 PM, "François Stephany" <[hidden email]> a écrit :
As Sven mentionned it, you can simply put your filetree files in a subdirectory.
You can have a look at https://github.com/fstephany/hello-pharo It's a bit outdated but it will give you the idea.

On Tue, Jul 28, 2015 at 12:42 PM, Tommaso Dal Sasso <[hidden email]> wrote:
Hello,

I am trying to version a project on git using filetree.
Since I also have some external resources (like images), I would avoid
loading the whole project from the pharo image, because that would
download the external files in a cache directory, thus making them
difficult to reach and update.

My idea is to update the git repository from the commandline, and then
run a script to build the image.

The question then is: is there an easy way to programmatically load a
project from a local directory?

Also, do you have any suggestions for a better workflow to handle this
situation?

Thanks,
Tommaso


Reply | Threaded
Open this post in threaded view
|

Re: Loading code from a local git repository

Tommaso DS
Thanks for the answers, I have the code in a separate directory, my
doubt was about how to load the code without using the GUI.

The script:

gitRepository := MCFileTreeRepository new directory: (FileLocator
imageDirectory / 'src').

Gofer it
  repository: gitRepository;
  package: 'Hello-Pharo';
  load.

taken from here:
https://github.com/fstephany/hello-pharo/blob/master/install.st really
did the trick.

Thanks a lot!
Tommaso


On 28/07/15 13:58, Thierry Goubier wrote:

> You can also add a makefile to build the pharo image in the git
> repository. I usually have a src/pharo packages build/Makefile structure.
>
> Thierry
>
> Le 28 juil. 2015 1:14 PM, "François Stephany" <[hidden email]
> <mailto:[hidden email]>> a écrit :
>
>     As Sven mentionned it, you can simply put your filetree files in a
>     subdirectory.
>     You can have a look at https://github.com/fstephany/hello-pharo It's
>     a bit outdated but it will give you the idea.
>
>     On Tue, Jul 28, 2015 at 12:42 PM, Tommaso Dal Sasso
>     <[hidden email] <mailto:[hidden email]>> wrote:
>
>         Hello,
>
>         I am trying to version a project on git using filetree.
>         Since I also have some external resources (like images), I would
>         avoid
>         loading the whole project from the pharo image, because that would
>         download the external files in a cache directory, thus making them
>         difficult to reach and update.
>
>         My idea is to update the git repository from the commandline,
>         and then
>         run a script to build the image.
>
>         The question then is: is there an easy way to programmatically
>         load a
>         project from a local directory?
>
>         Also, do you have any suggestions for a better workflow to
>         handle this
>         situation?
>
>         Thanks,
>         Tommaso
>
>