lib/physique/task_builders/octopus.rb in physique-0.3.4 vs lib/physique/task_builders/octopus.rb in physique-0.3.5
- old
+ new
@@ -51,11 +51,11 @@
def opts
raise ArgumentError, 'You must specify a :project to deploy' if @project.blank?
raise ArgumentError, 'You must specify the :type of project to deploy' if @type.blank?
raise ArgumentError, "Project :type #{@type} is not supported." unless supported_types.include? @type
- project_file_path = Physique::Project.get_path(@project, @lang)
+ project_file_path = Physique::ProjectPathResolver.resolve(@project, @lang)
_, project_file = File.split project_file_path
project_name = File.basename(project_file, '.*')
Map.new({
type: @type,
@@ -91,13 +91,13 @@
private
def add_octopus_package_tasks
@options.apps.each do |a|
- namespace :package do
+ namespace a.name do
desc "Package #{a.project} for Octopus deployment"
- octopus_pack a.name => [:versionizer, :test] do |o|
+ octopus_pack :package => [:versionizer, :test] do |o|
ensure_output_location solution.nuget.build_location
o.project_file = a.project_file
o.type = a.type
o.configuration = solution.compile.configuration
@@ -114,12 +114,12 @@
def add_octopus_publish_tasks
nuget = solution.nuget
@options.apps.each do |a|
- namespace :publish do
+ namespace a.name do
desc "Publish #{a.project} app to Octopus Server"
- task a.name => [ "package:#{a.name}" ] do
+ task :publish => [ "package:#{a.name}" ] do
package_location = Albacore::Paths.normalise_slashes "#{nuget.build_location}/#{a.project}.#{a.metadata.version}.nupkg"
sh "#{nuget.exe} push #{package_location} -ApiKey #{@options.api_key} -Source #{@options.server}"
end
end
end
\ No newline at end of file