Sha256: a2e273819309b89170e5170fcdab3d1ee91f67074aa406b4ee6cdab85362f84d

Contents?: true

Size: 1.14 KB

Versions: 207

Compression:

Stored size: 1.14 KB

Contents

module Origen
  module CodeGenerators
    class Timever < Origen::CodeGenerators::Base
      desc <<-END
This generator will convert an application to use timestamp (sm_2014_12_04_11_11) versioning.
It can also be used to bring a legacy version file up to date with the latest structure.
END
      def create_version_file
        if config[:change]
          @version = config[:change]
        else
          @version = Origen.app.version
          unless @version.timestamp?
            if @version.production?
              @version = VersionString.production_timestamp
            else
              @version = VersionString.development_timestamp
            end
          end
        end
        template 'templates/code_generators/version_time.rb', File.join(Origen.root, 'config', 'version.rb'), force: true
      end

      def set_configuration
        if Origen.app.config.semantically_version
          comment_config :semantically_version
          add_config :semantically_version, false
        end
      end

      def print_version
        puts
        puts "You're new app version is: #{Origen.app.version(refresh: true)}"
      end
    end
  end
end

Version data entries

207 entries across 207 versions & 1 rubygems

Version Path
origen-0.7.38 lib/origen/code_generators/timever.rb
origen-0.7.37 lib/origen/code_generators/timever.rb
origen-0.7.36 lib/origen/code_generators/timever.rb
origen-0.7.35 lib/origen/code_generators/timever.rb
origen-0.7.34 lib/origen/code_generators/timever.rb
origen-0.7.33 lib/origen/code_generators/timever.rb
origen-0.7.32 lib/origen/code_generators/timever.rb
origen-0.7.31 lib/origen/code_generators/timever.rb
origen-0.7.30 lib/origen/code_generators/timever.rb
origen-0.7.29 lib/origen/code_generators/timever.rb
origen-0.7.28 lib/origen/code_generators/timever.rb
origen-0.7.27 lib/origen/code_generators/timever.rb
origen-0.7.26 lib/origen/code_generators/timever.rb
origen-0.7.25 lib/origen/code_generators/timever.rb
origen-0.7.24 lib/origen/code_generators/timever.rb
origen-0.7.23 lib/origen/code_generators/timever.rb
origen-0.7.22 lib/origen/code_generators/timever.rb
origen-0.7.21 lib/origen/code_generators/timever.rb
origen-0.7.20 lib/origen/code_generators/timever.rb
origen-0.7.19 lib/origen/code_generators/timever.rb