Sha256: ba3a664b2482aaffb8549a0eb73e164a347175bffb75d0f6c253a779d8d38fb3

Contents?: true

Size: 1.65 KB

Versions: 12

Compression:

Stored size: 1.65 KB

Contents

# ===========================================================================
# SC::Target Buildtasks
# copyright 2008, Sprout Systems, Inc. and Apple, Inc. all rights reserved
# ===========================================================================

# Tasks invoked while building Target objects.  You can override these methods
# in your buildfiles.
namespace :target do

  # Invoked whenever a new target is created to prepare standard properties 
  # needed on the build system.  Extend this task to add other standard
  # properties
  task :prepare do

    # use url_root config or merge url_prefix + target_name
    TARGET.url_root = CONFIG.url_root || 
      [nil, CONFIG.url_prefix, TARGET.target_name].join('/').gsub(/\/+/,'/')
    
    # use index_root config or merge index_prefix + target_name
    TARGET.index_root = CONFIG.index_root || 
      [nil, CONFIG.index_prefix, TARGET.target_name].join('/').gsub(/\/+/, '/')

    # Split all of these paths in case we are on windows...
    TARGET.build_root = File.expand_path(CONFIG.build_root || 
      File.join(PROJECT.project_root.to_s, 
        (CONFIG.build_prefix || '').to_s.split('/'), 
        (CONFIG.url_prefix || '').to_s.split('/'), 
        TARGET.target_name.to_s.split('/')))
        
    TARGET.staging_root = File.expand_path(CONFIG.staging_root ||
      File.join(PROJECT.project_root.to_s, 
        (CONFIG.staging_prefix || '').to_s.split('/'), 
        (CONFIG.url_prefix || '').to_s.split('/'), 
        TARGET.target_name.to_s))
      
    TARGET.build_number = TARGET.compute_build_number
    
    # The target is loadable if it is an app
    TARGET.loadable = TARGET.target_type == :app
  end
  
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sproutit-sproutcore-1.0.0.20090407205609 buildtasks/target.rake
sproutit-sproutcore-1.0.0.20090408130025 buildtasks/target.rake
sproutit-sproutcore-1.0.0.20090416161445 buildtasks/target.rake
sproutit-sproutcore-1.0.0.20090720093355 buildtasks/target.rake
sproutit-sproutcore-1.0.0.20090720202429 buildtasks/target.rake
sproutit-sproutcore-1.0.0.20090721125122 buildtasks/target.rake
sproutit-sproutcore-1.0.126 buildtasks/target.rake
sproutit-sproutcore-1.0.20090721145236 buildtasks/target.rake
sproutit-sproutcore-1.0.20090721145251 buildtasks/target.rake
sproutit-sproutcore-1.0.20090721145280 buildtasks/target.rake
sproutit-sproutcore-1.0.20090721145281 buildtasks/target.rake
sproutit-sproutcore-1.0.203 buildtasks/target.rake