Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Commit

Permalink
Website packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Remeika committed Jun 21, 2011
1 parent d9c2d0b commit 170a39c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
37 changes: 36 additions & 1 deletion Jakefile
@@ -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 (){
Expand Down Expand Up @@ -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); }
//});


});
});



15 changes: 14 additions & 1 deletion site/www/src/documents/download.html
Expand Up @@ -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 -->
4 changes: 2 additions & 2 deletions site/www/src/layouts/home.html
Expand Up @@ -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>
Expand Down

0 comments on commit 170a39c

Please sign in to comment.