Skip to main content

JIS : Rake - Ruby Build System

JIS : Rake - Ruby Build System: "The main task is build. It is defined by the call task :build. Then we pass an array of dependencies to task that :build depends on (in this case only one “:clean”). Then we simply shell (sh) out to csc to build everything for me. Not much different from a BAT file in its current state. Here is a piece of my real build that handles versioning...

task :version_main do |t|
versions.transaction do |o|
v = versions['main'].increment
File::open('Main.AssemblyVersion.cs', 'w') do |av|
av.write '[System.Reflection.AssemblyVersion(\'#{v.major}.#{v.minor}.#{v.build}.#{v.revision}\')]'
end
end
end

task :version => [:version_main] do |t|
print 'Everything versioned'
end

The versions variable is an instance of PStore. It is a hashtable that holds a bunch of Version objects for each project. It is pretty similar to the tag in NAntContrib as I show it above. But the versions variable could be a BerkleyDB or a MySQL rowset, etc. Much harder to do this swap with the tag."
Post a Comment

Popular posts from this blog

Compact and Repair an Access Database. Add Ref. to : AdoDb, Jro

< ?xml version="1.0" encoding="utf-8" ?>









using ADODB;
using JRO;
using System.Configuration;
using System.Data.OleDb;
using System.IO;

public class CompactAndRepairAccessDb : System.Windows.Forms.Form
{
private System.ComponentModel.Container components = null;
private JRO.JetEngine jro;
private System.Windows.Forms.Button btnConfirm;
private System.Windows.Forms.TextBox tbxOriginalDbSize;
private System.Windows.Forms.TextBox tbxCompactedDbSize;
private OleDbConnection cnn;

public CompactAndRepairAccessDb() {
InitializeComponent();

FileInfo fi = new FileInfo( ConfigurationSettings.AppSettings["PathOriginal"] );
int s = Convert.ToInt32( fi.Length/1000 );
this.tbxOriginalDbSize.Text = s.ToString() + " kb";
}

private void btnConfirm_Click(object sender, System.EventArgs e) {
// First close all instances of the database
// MUST HAVE EXCLUS…

VBScript to Automate login into gmail

Dim IE
Dim uSERNAME
Dim PASSWORD
Dim crtScreen
Set IE = CreateObject("InternetExplorer.Application")
USERNAME = "saudaziz"
PASSWORD = ""

With IE
.navigate "http://www.gmail.com"
.visible=1
End With

'wait a while until IE as finished to load
Do while IE.busy
loop
set WshShell = WScript.CreateObject("WScript.Shell")
Do While UCase(IE.Document.readyState) <> "COMPLETE"
WScript.Sleep 100
DoEvents
Loop
set WshShell=nothing
IE.document.all.Item("Email").value = USERNAME
IE.document.all.Item("pASSWD").value =pASSWORD
'IE.document.gaia_loginform.Email.value=USERNAME
IE.document.all.item("null").click
Set IE = Nothing

WScript.Quit(0)