Problem involving Ruby, git and cron

J

James Coglan

[Note: parts of this message were removed to make it a legal post.]

Sorry to post this here, it's really a combined Ruby/Linux/Git problem but
I'm hoping someone here can point me in the right direction. I've written a
Ruby script that exports all known branches of some git repos to static
files, and optionally performs builds of JavaScript projects. It looks like
this:

http://gist.github.com/96357

To run: save this in a file, e.g. ~/widgets/export, make it executable and
perform the following in the ~/widgets directory:

chmod +x export
mkdir repos
mkdir static
cd repos
git clone git://github.com/jcoglan/heist.git
git clone git://github.com/jcoglan/js.class.git

Also, install these:

sudo gem install hoe grit jake

Then, go back to your home dir and run the script:

cd ~
widgets/export

You should see a ton of stuff appear in the 'static' dir. Also notice that
the contents of static/js.class/0.9.0 and static/js.class/2.0.0 (for
example) are different. Next, set this script up to run under cron using
'crontab -e' (First digit is the minutes past the hour the script will run.
Replace my username with your own.)

crontab -e
40 * * * * /home/jcoglan/widgets/export

Wait for the script to run, then inspect the directories again. All versions
of js.class are now the same, whereas the heist versions are still distinct.
Also, If I remove the heist repo, js.class exports correctly.

I've no idea why any of this should be the case: any help would be very
gratefully received!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,735
Latest member
HikmatRamazanov

Latest Threads

Top