Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sugryo
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sugryo/94ca233d7efbffcc555c to your computer and use it in GitHub Desktop.
Save sugryo/94ca233d7efbffcc555c to your computer and use it in GitHub Desktop.
get_groongaTag
require "octokit"
github_token = ENV["GITHUB_TOKEN"]
client = Octokit.new(access_token: github_token)
tags = client.tags("groonga/groonga")
versions = tags.map do |tag|
tag.name.delete("v.").to_i
end
max_version = versions.max.to_s
max_version.insert!(1, ".")
max_version.insert(3, ".")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment