(Internal use) Takes path to build.gradle as well as "versionName" or "versionCode" string to check for change.
 @return [void]
346306
def assert_version_changed(build_gradle_file_path, name_or_code)
      unless File.file?(build_gradle_file_path)
        fail "build.gradle file at path " + build_gradle_file_path + " does not exist."
        return # rubocop:disable UnreachableCode
      end

      unless git.diff_for_file(build_gradle_file_path) # No diff found for build.gradle file.
        fail "You did not edit your build.gradle file at all. Therefore, you did not change the " + name_or_code + "."
        return # rubocop:disable UnreachableCode
      end

      git_diff_string = git.diff_for_file(build_gradle_file_path).patch
      assert_version_changed_diff(git_diff_string, name_or_code)
    end
704134
def default
      res = FalkorLib::Config::DEFAULTS.clone
      $LOADED_FEATURES.each do |path|
        res[:git]        = FalkorLib::Config::Git::DEFAULTS        if path.include?('lib/falkorlib/git.rb')
        res[:gitflow]    = FalkorLib::Config::GitFlow::DEFAULTS    if path.include?('lib/falkorlib/git.rb')
        res[:versioning] = FalkorLib::Config::Versioning::DEFAULTS if path.include?('lib/falkorlib/versioning.rb')
        if path.include?('lib/falkorlib/puppet.rb')
          res[:puppet] = FalkorLib::Config::Puppet::DEFAULTS
          res[:templates][:puppet][:modules] = FalkorLib::Config::Puppet::Modules::DEFAULTS[:metadata]
        end
      end
      # Check the potential local customizations
      [:local, :private].each do |type|
        custom_cfg = File.join( res[:root], res[:config_files][type.to_sym])
        if File.exist?( custom_cfg )
          res.deep_merge!( load_config( custom_cfg ) )
        end
      end
      res
    end
179765
def update_version(self, version, step=1):
        ""

        # update the version based on the flags passed.
        if self.config.patch:
            version.patch += step
        if self.config.minor:
            version.minor += step
        if self.config.major:
            version.major += step
        if self.config.build:
            version.build_number += step
        if self.config.build_number:
            version.build_number = self.config.build_number

        # create a new tag in the repo with the new version.
        if self.config.dry_run:
            log.info('Not updating repo to version {0}, because of --dry-run'.format(version))
        else:
            version = self.call_plugin_function('set_version', version)

        return version
1232805
private void processVersionLine(String log) {
    log = log.replace(start, "");
    String[] pieces = log.split(" \\(");
    if (pieces.length == 2) {
      version = pieces[0];
      build = pieces[1].replace(")", "");
      // old builds do not include build info. Xcode 4.3.2 return 1.0 without build info
    } else {
      version = pieces[0];
      build = null;
    }
  }
155109
def exec
      update_rubocop!
      before_version, after_version = regenerate_rubocop_todo!
      corrected_rule = rubocop_challenge!(before_version, after_version)
      regenerate_rubocop_todo!
      add_to_ignore_list_if_challenge_is_incomplete(corrected_rule)
      create_pull_request!(corrected_rule)
    end
1136298
def VersionPath():
  """"""

  # Try to get a version.ini. It should be in the resources if the code
  # was packed with "pip sdist". It will be 2 levels up from grr_response_core
  # if the code was installed via "pip install -e".
  version_ini = (
      package.ResourcePath("grr-response-core", "version.ini") or
      package.ResourcePath("grr-response-core", "../../version.ini"))

  if not os.path.exists(version_ini):
    raise RuntimeError("Can't find version.ini at %s" % version_ini)

  return version_ini
495436
def _validate_version(request)
      unless self.class.versions.include?(request.version)
        _error!(Errors::NotFoundError, request.version)
      end
    end
1083402
function checkIfVersionUpdated() {

        var latestBuildNumber = updateJsonHandler.get("latestBuildNumber"),
            currentBuildNumber = Number(/-([0-9]+)/.exec(brackets.metadata.version)[1]);

        return latestBuildNumber === currentBuildNumber;
    }
656870
def at_version(version)
      return self if log_data.version == version

      log_entry = log_data.find_by_version(version)
      return nil unless log_entry

      build_dup(log_entry)
    end
96147
def missing_dependencies
      missing = []
      dependency_versions(:recursive => false).each do |pkg, target_versions|
        found = false
        target_versions.each do |_target, versions|
          dependency = dependency_for(pkg)
          found = versions.any? { |version| dependency.match?(pkg, version) }
        end
        missing << pkg unless found
      end
      missing
    end
232452
def update_files paths, matcher, currentVersion, nextVersion
      paths.each do |path|
        update_file path, matcher, currentVersion, nextVersion
      end
    end
301875
public static boolean checkVersionDirName(File versionDir) {
        return (versionDir.isDirectory() && versionDir.getName().contains("version-") && !versionDir.getName()
                                                                                                    .endsWith(".bak"));
    }
963608
def version
      return @detected_version if defined? @detected_version
      version = installed_versions.find { |p, _v| p == path }
      @detected_version = version.nil? ? nil : version[1]
    end
953672
def check_for_changes(name=nil)
      changed = []
      if name == nil
        self.cache_hash.keys.dup.each do |name|
          if reload_on_change(name)
            changed << name
          end
        end
      else
        name = name.to_s
        if reload_on_change(name)
          changed << name
        end
      end
      logger.debug "check_for_changes(#{name.inspect}) => #{changed.inspect}"
      changed
    end
931976
def version_from_file
      if File.exist?(Rails.root.join("REVISION"))
        File.read(Rails.root.join("REVISION")).chomp
      end
    end
186036
def version
      @version ||= IO.popen([@path, "--version"]) do |io|
        io.gets[VERSION_PATTERN, 1]
      end
    rescue => e
      raise Error, "Couldn't load #{@path}: #{e}"
    end
407136
def current_version():
    """"""
    filepath = os.path.abspath(
        project_root / "directory_components" / "version.py")
    version_py = get_file_string(filepath)
    regex = re.compile(Utils.get_version)
    if regex.search(version_py) is not None:
        current_version = regex.search(version_py).group(0)
        print(color(
            "Current directory-components version: {}".format(current_version),
            fg='blue', style='bold'))
        get_update_info()
    else:
        print(color(
            'Error finding directory-components version.',
            fg='red', style='bold'))