Permalink
Browse files

Website packaging

  • Loading branch information...
1 parent d9c2d0b commit 170a39cdc6dd9b8aac0ace7b69c175feb9cc3206 @foobarfighter committed Jun 21, 2011
Showing with 52 additions and 4 deletions.
  1. +36 −1 Jakefile
  2. +14 −1 site/www/src/documents/download.html
  3. +2 −2 site/www/src/layouts/home.html
View
@@ -1,6 +1,7 @@
var fs = require('fs')
, fsh = require('fsh')
, pth = require('path')
+ , exec = require('child_process').exec
, PacMan = require('./build/pacman').PacMan;
var generateBrowserSuite = function (){
@@ -116,9 +117,43 @@ namespace('build', function (params) {
});
desc('Builds all adapter environments');
- task('all', ['build:core', 'build:browser', 'build:server', 'build:templates'], function (){
+ task('all', ['build:core', 'build:browser', 'build:server'], function (){
console.log('--> Built all adapters');
});
});
+namespace('site', function (){
+ desc('Update generator templates and package bundles for the website');
+ task('update', ['build:all'], function (){
+ var version = process.env.VERSION;
+
+ if (!version){
+ throw new Error('Could not package without VERSION environment variable');
+ }
+
+ console.log('--> generating website');
+
+ exec('cd site/www && docpad generate',
+ function (error, stdout, stderr){
+ var files = fsh.findSync(__dirname + '/site/www/out', /\.(html|js)$/);
+ for (var i = 0, ii = files.length; i < ii; ++i){
+ var content = fs.readFileSync(files[i]);
+ content.toString().replace(/\$version/, version);
+ fs.writeFileSync(files[i], content);
+ }
+ });
+
+ //log('packaging ' + srcpkg);
+
+ //var srcpkg = 'foounit-' + version + '-src.tar.gz'
+ //exec('tar cvfz ' + srcpkg + ' *', function (error){
+ // if (error){ throw new Error('Error while packaging: ', error); }
+ //});
+
+
+ });
+});
+
+
+
@@ -4,6 +4,19 @@
<!-- Download -->
<h1>Download</h1>
-Coming soon... like within days.
+<p>
+ Get the browser version: <a href="downloads/foounit-$version-browser.tar.gz">foounit-$version-src.tar.gz</a>
+ Get the node version:
+<pre class="code">
+$ npm install -g foounit
+</pre>
+</p>
+<p>
+ Source distribution: <a href="downloads/foounit-$version-src.tar.gz">foounit-$version-src.tar.gz</a>
+</p>
+
+<p>
+ Get older versions <a href="downloads">here</a>.
+</p>
<!-- /Download -->
@@ -20,10 +20,10 @@
<div id="download-tag">
<div>
<span class="version">
- Version 0.0.7<br>Updated: Today
+ Version $version<br>Updated: Today
</span>
<span class="separator"></span>
- <a href="http://search.npmjs.org/#/foounit">Download</a>
+ <a href="download.html">Download</a>
</div>
</div>
</div>

0 comments on commit 170a39c

Please sign in to comment.