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.11.0.rc2 bin/autoproj-snapshot
autoproj-1.11.0.rc1 bin/autoproj-snapshot
autoproj-1.11.0.b3 bin/autoproj-snapshot
autoproj-1.11.0.b2 bin/autoproj-snapshot
autoproj-1.11.0.b1 bin/autoproj-snapshot
autoproj-1.10.2 bin/autoproj-snapshot
autoproj-1.10.1 bin/autoproj-snapshot
autoproj-1.10 bin/autoproj-snapshot
autoproj-1.10.rc1 bin/autoproj-snapshot
autoproj-1.9.7.rc23 bin/autoproj-snapshot
autoproj-1.9.7.rc22 bin/autoproj-snapshot
autoproj-1.9.7.rc21 bin/autoproj-snapshot
autoproj-1.9.7.rc20 bin/autoproj-snapshot
autoproj-1.9.7.rc19 bin/autoproj-snapshot
autoproj-1.9.7.rc18 bin/autoproj-snapshot
autoproj-1.9.7.rc17 bin/autoproj-snapshot
autoproj-1.9.7.rc16 bin/autoproj-snapshot
autoproj-1.9.7.rc15 bin/autoproj-snapshot
autoproj-1.9.7.rc14 bin/autoproj-snapshot
autoproj-1.9.7.rc13 bin/autoproj-snapshot