Re: [Pharo-dev] Metacello: Possible to detect updates in a Github repo ?

2015-01-28 Thread Serge Stinckwich
On Tue, Jan 27, 2015 at 7:58 PM, kilon alios kilon.al...@gmail.com wrote:
 I was wondering how possible it is to check a github repo for new commits
 and compare it with the existing code to based on the Baseline loading of a
 Github repo to Pharo. Is it possible ?

Normally, you can define webhooks in github :
https://developer.github.com/webhooks/
Every time, there is an event (comit, fork, etc ...) on your
repository, you can launch
an HTTP POST request somewhere.

You can also use existing services :
https://github.com/github/github-services/tree/master/docs

Regards,
-- 
Serge Stinckwich
UCBN  UMI UMMISCO 209 (IRD/UPMC)
Every DSL ends up being Smalltalk
http://www.doesnotunderstand.org/



Re: [Pharo-dev] Metacello: Possible to detect updates in a Github repo ?

2015-01-28 Thread kilon alios
Thank you both, looks like this one will need some extra work from my part.
I will have to postpone it for now because its not a a high priority as
other things I planned but will definetly take a look at your pointers Dale
and Serge links ASAP at least to get an idea about the direction I will be
going with this.


[Pharo-dev] Metacello: Possible to detect updates in a Github repo ?

2015-01-27 Thread kilon alios
I was wondering how possible it is to check a github repo for new commits
and compare it with the existing code to based on the Baseline loading of a
Github repo to Pharo. Is it possible ?

I want to make an updater for my project that will pop up a dialog to alert
the user for new updates in my Github repo.

Does a Baseline have access to git commits and their time/date signature ?

By the way Dale forgot to reply previously that I am definetly checking out
git tags as you suggested.


Re: [Pharo-dev] Metacello: Possible to detect updates in a Github repo ?

2015-01-27 Thread Dale Henrichs


On 01/27/2015 10:58 AM, kilon alios wrote:
I was wondering how possible it is to check a github repo for new 
commits and compare it with the existing code to based on the Baseline 
loading of a Github repo to Pharo. Is it possible ?
Yes, I think there are a couple of different ways to skin that cat. The 
logic in MCGitBasedNetworkRepository 
classprojectDirectoryFrom:version: could be picked apart to determine 
if a new download is available, but it relies on downloading and 
partially unpacking the zip file for the given target, which is pretty 
heavy weight ...


For notifications I would be inclined to look at the github/bitbucket 
web api and see what can be done. Someday I plan to look into this, but 
haven't done the due diligence yet.


I want to make an updater for my project that will pop up a dialog to 
alert the user for new updates in my Github repo.


Does a Baseline have access to git commits and their time/date 
signature ?


The registry records the `repositoryVersionString` of the loaded 
baseline which is the SHA of the commit for a filetree/git repo. For the 
MCGitBasedNetworkRepository, the `repositoryVersionString` is based on 
the unique identifier for the download, which is not always a commit SHA 
... for tags, I think that the identifier is the SHA of the tag ...


Timestamp  is not always useful since it is the relationship of commits 
on a branch that is  important for comparison purposes ...


At then end of the day, though, I think that these issues can be 
addressed a nice little updater tool can be built ... I will be 
interested to see what you've done, if you get there first:)




By the way Dale forgot to reply previously that I am definetly 
checking out git tags as you suggested.


Cool,

Dale