Sha256: 5606f2b4e200fabf54f605423ab2be9b20b1e364b9d26e98176d0d39b7db72ac
Contents?: true
Size: 984 Bytes
Versions: 2
Compression:
Stored size: 984 Bytes
Contents
require 'optparse' require 'yaml' require 'mustache' require 'distrib_builder/builder' require 'distrib_builder/versioner' require 'distrib_builder/version' module DistribBuilder DISTRIB_TYPES = ['build', 'version'] WORK_DIR = Dir.pwd CONFIG_FILE = "DistribBuilder.yml" CMAKELIST_FILE = "CMakeLists.txt" VERSION_PATTERN = Regexp.new('_VERSION \"\d+\.\d+\.\d+\"') BUILD_PATTERN = Regexp.new('_BUILD \"\d+\"') class Main def self.run args = duplicate_argv type = args.shift if type == '--version' puts VERSION return elsif !DISTRIB_TYPES.include?(type) && args.empty? puts "Use 'distrib_builder version --help' or 'distrib_builder build --help' for more information" puts "Exit" return end if type == 'build' Builder::Main.new(args).run else Versioner::Main.new(args).run end end private def self.duplicate_argv ARGV.dup end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
distrib_builder-0.0.3 | lib/distrib_builder.rb |
distrib_builder-0.0.2 | lib/distrib_builder.rb |