Commit 7f2be54f authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Move JSDuck version number to separate file.

So it's easy to find and update in there.
parent 629a091d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
require 'digest/md5'
require 'fileutils'
require 'jsduck/util/null_object'
require 'jsduck/version'
require 'set'

module JsDuck
@@ -59,7 +60,6 @@ module JsDuck
    attr_reader :previous_entry

    def initialize(opts)
      @jsduck_version = opts.version
      @cache_dir = opts.cache_dir
      @manifest_file = @cache_dir + "/manifest.txt"
      @previous_entry = nil
@@ -129,7 +129,7 @@ module JsDuck
    end

    def current_manifest
      "Ruby: #{RUBY_VERSION}, JSDuck: #{@jsduck_version}\n"
      "Ruby: #{RUBY_VERSION}, JSDuck: #{JsDuck::VERSION}\n"
    end

  end
+3 −4
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@ require 'jsduck/util/parallel'
require 'jsduck/tag_registry'
require 'jsduck/js/ext_patterns'
require 'jsduck/warning/parser'
require 'jsduck/version'

module JsDuck

@@ -18,7 +19,6 @@ module JsDuck
    attr_accessor :ignore_global
    attr_accessor :external_classes
    attr_accessor :ext4_events
    attr_accessor :version

    # Customizing output
    attr_accessor :title
@@ -102,7 +102,6 @@ module JsDuck
      ]
      @ext4_events = nil

      @version = "5.3.3"
      # Customizing output
      @title = "Documentation - JSDuck"
      @header = "<strong>Documentation</strong> JSDuck"
@@ -860,7 +859,7 @@ module JsDuck
        end

        opts.on('--version', "Prints JSDuck version") do
          puts "JSDuck " + @version + " (Ruby #{RUBY_VERSION})"
          puts "JSDuck " + JsDuck::VERSION + " (Ruby #{RUBY_VERSION})"
          exit
        end
      end
@@ -965,7 +964,7 @@ module JsDuck
    def format_footer(text)
      jsduck = "<a href='https://github.com/senchalabs/jsduck'>JSDuck</a>"
      date = Time.new.strftime('%a %d %b %Y %H:%M:%S')
      text.gsub(/\{VERSION\}/, @version).gsub(/\{JSDUCK\}/, jsduck).gsub(/\{DATE\}/, date)
      text.gsub(/\{VERSION\}/, JsDuck::VERSION).gsub(/\{JSDUCK\}/, jsduck).gsub(/\{DATE\}/, date)
    end

    # Runs checks on the options

lib/jsduck/version.rb

0 → 100644
+3 −0
Original line number Diff line number Diff line
module JsDuck
  VERSION = "5.3.3"
end