As you might know, YOURLS development is now hosted on Github. It's now easy to download the current development snapshot, since Github provides an archive/master.zip.
But not so long ago, YOURLS dev was hosted on Google Code, where there is no such convenient way to download the current SVN trunk as a .zip archive. To generate "nightly builds", I wrote this little script:
- #!/bin/bash
- # Simple bash script to generate YOURLS nightly builds
- # Export in a year-month-day directory
- PWD="/home/ozh/yourls.org/nightly-builds"
- BUILD=$(date +%Y-%m-%d)
- svn -q export http://yourls.googlecode.com/svn/trunk/ $PWD/$BUILD
- # Make package and remove dir
- cd $PWD
- zip -r -q yourls-$BUILD.zip $BUILD
- rm -rf $BUILD
- # Remove old (>7 days) builds
- find $PWD/*zip -mtime +7 -exec rm {} \;
Now you just need to add the script to your cron jobs and call it every night.
Shorter URL
Want to share or tweet this post? Please use this short URL: http://ozh.in/w9
This entry "How-to: generate nightly builds from a SVN repository" was posted on 24/04/2013 at 6:51 pm and is tagged with Bash, Code, YOURLS
Watch this discussion : Comments RSS 2.0.