Class: Albacore::FsharpProject

Inherits:
Project
  • Object
show all
Defined in:
lib/albacore/fsharp_project.rb

Instance Attribute Summary

Attributes inherited from Project

#proj_filename, #proj_path_base, #proj_xml_node

Instance Method Summary collapse

Methods inherited from Project

#asmname, #assembly_info_path, #authors, #declared_packages, #declared_projects, #description, #fallback_output_path, #faulty_refs, #find_packages, #find_refs, #guid, #guid_raw, #has_faulty_refs?, #has_packages_config?, #has_paket_deps?, #has_paket_refs?, #id, #included_files, #license, #name, #namespace, #output_dll, #output_path, #package_config, #paket_deps, #paket_refs, #path, #save, #to_s, #try_output_path, #version

Methods included from Logging

#debug, #err, #error, #fatal, #info, #puts, #trace, #warn

Constructor Details

#initialize(project_path) ⇒ FsharpProject

Returns a new instance of FsharpProject.



4
5
6
7
# File 'lib/albacore/fsharp_project.rb', line 4

def initialize(project_path)
  super(project_path)
  sanity_checks
end

Instance Method Details

#default_assembly_versionObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/albacore/fsharp_project.rb', line 9

def default_assembly_version
  begin
    info= File.read(assembly_info_path)
    v   = info.each_line
              .select { |l| !(l.start_with?('//')||l.start_with?('(*')) && l.include?('AssemblyVersion(') }.first
    reg = /"(.*?)"/
    reg.match(v).captures.first
  rescue
    '1.0.0.0'
  end

end