Sha256: 110777ef092aabab632b9f9bc3eccace1bf1f4d694e39d6a41bf93ffb1f6e9d5

Contents?: true

Size: 1.2 KB

Versions: 51

Compression:

Stored size: 1.2 KB

Contents

#! /usr/bin/env ruby

require 'autoproj'
require 'autoproj/cmdline'

current_dir = Dir.pwd
remaining_args = Autoproj.silent do
    Autoproj::CmdLine.initialize_root_directory
    Autoproj::CmdLine.initialize_and_load(ARGV)
end

snapshot_dir = File.expand_path(remaining_args.shift, current_dir)
if !snapshot_dir
    raise ConfigError.new, "target directory missing\nusage: autoproj snapshot target_dir"
end

user_selection = remaining_args.map do |arg|
    if File.directory?(arg)
        File.expand_path(arg)
    else arg
    end
end
manifest = Autoproj.manifest
Autoproj::CmdLine.report do
    resolved_selection = Autoproj::CmdLine.
        resolve_user_selection(user_selection, :filter => false)
    resolved_selection.filter_excluded_and_ignored_packages(Autoproj.manifest)
    # This calls #prepare, which is required to run build_packages
    packages = Autoproj::CmdLine.import_packages(resolved_selection)
    # Remove non-existing packages
    packages.each do |pkg|
        if !File.directory?(manifest.package(pkg).autobuild.srcdir)
            raise ConfigError, "cannot snapshot #{pkg.name} as it is not checked out"
        end
    end
    Autoproj::CmdLine.snapshot(Autoproj.manifest, snapshot_dir, packages)
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
autoproj-1.12.6 bin/autoproj-snapshot
autoproj-1.12.5 bin/autoproj-snapshot
autoproj-1.12.4 bin/autoproj-snapshot
autoproj-1.12.3 bin/autoproj-snapshot
autoproj-1.12.2 bin/autoproj-snapshot
autoproj-1.12.1 bin/autoproj-snapshot
autoproj-1.12.0 bin/autoproj-snapshot
autoproj-1.11.0.rc15 bin/autoproj-snapshot
autoproj-1.11.0.rc14 bin/autoproj-snapshot
autoproj-1.11.0.rc13 bin/autoproj-snapshot
autoproj-1.11.0.rc12 bin/autoproj-snapshot
autoproj-1.11.0.rc11 bin/autoproj-snapshot
autoproj-1.11.0.rc10 bin/autoproj-snapshot
autoproj-1.11.0.rc9 bin/autoproj-snapshot
autoproj-1.11.0.rc8 bin/autoproj-snapshot
autoproj-1.11.0.rc7 bin/autoproj-snapshot
autoproj-1.11.0.rc6 bin/autoproj-snapshot
autoproj-1.11.0.rc5 bin/autoproj-snapshot
autoproj-1.11.0.rc4 bin/autoproj-snapshot
autoproj-1.11.0.rc3 bin/autoproj-snapshot