forked from mxriverlynn/Albacore
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working on greatly simplifying the tasks, and adding more rakeish syn…
…tax. got the assemblyinfo, command, expandtemplates, and msbuild done so far.
- Loading branch information
Derick Bailey
committed
Dec 3, 2009
1 parent
0b35de9
commit 9a760ce
Showing
10 changed files
with
51 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
require 'rake/tasklib' | ||
|
||
module Albacore | ||
class AssemblyInfoTask < Rake::TaskLib | ||
attr_accessor :name | ||
|
||
def initialize(name=:assemblyinfo, &block) | ||
@name = name | ||
@block = block | ||
define | ||
end | ||
|
||
def define | ||
task name do | ||
@asm = AssemblyInfo.new | ||
@block.call(@asm) unless @block.nil? | ||
@asm.write | ||
fail if @asm.failed | ||
end | ||
|
||
def self.assemblyinfo(name=:assemblyinfo, *args, &block) | ||
MSBuildTask.new(name, *args, &block) | ||
end | ||
|
||
class AssemblyInfoTask < Albacore::AlbacoreTask | ||
def execute(task_args) | ||
@asm = AssemblyInfo.new | ||
@block.call(@asm, *task_args) unless @block.nil? | ||
@asm.write | ||
fail if @asm.failed | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
require 'rake/tasklib' | ||
|
||
module Albacore | ||
class CommandTask < Rake::TaskLib | ||
attr_accessor :name | ||
|
||
def initialize(name=:command, &block) | ||
@name = name | ||
@block = block | ||
define | ||
end | ||
|
||
def define | ||
task name do | ||
cmd = Command.new | ||
@block.call(cmd) unless @block.nil? | ||
cmd.execute | ||
fail if cmd.failed | ||
end | ||
def self.command(name=:command, *args, &block) | ||
MSBuildTask.new(name, *args, &block) | ||
end | ||
|
||
class CommandTask < Albacore::AlbacoreTask | ||
def execute(task_args) | ||
cmd = Command.new | ||
@block.call(cmd, *task_args) unless @block.nil? | ||
cmd.execute | ||
fail if cmd.failed | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
require 'rake/tasklib' | ||
|
||
module Albacore | ||
class ExpandTemplatesTask < Rake::TaskLib | ||
attr_accessor :name | ||
|
||
def initialize(name=:expandtemplates, &block) | ||
@name = name | ||
@block = block | ||
define | ||
end | ||
|
||
def define | ||
task @name do | ||
@exp = ExpandTemplates.new | ||
@block.call(@exp) unless @block.nil? | ||
@exp.expand | ||
end | ||
def self.expandtemplates(name=:expandtemplates, *args, &block) | ||
MSBuildTask.new(name, *args, &block) | ||
end | ||
|
||
class ExpandTemplatesTask < Albacore::AlbacoreTask | ||
def execute(task_args) | ||
@exp = ExpandTemplates.new | ||
@block.call(@exp, *task_args) unless @block.nil? | ||
@exp.expand | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters