Actions
Feature #44037
openTo be independent of the version of the Tabler library
Status:
New
Priority:
Normal
Assignee:
-
Category:
Third-party libraries
Target version:
-
Resolution:
Description
Hello, some plugins who needs new icon from a newer version of tabler-icon we can change icons.rake like this :
unless Rails.env.production?
require 'net/http'
require 'json'
def fetch_latest_tabler_version
url = URI("https://api.github.com/repos/tabler/tabler-icons/releases/latest")
response = Net::HTTP.get(url)
json = JSON.parse(response)
json["tag_name"] # ex: "v3.43.0"
end
ICON_RELEASE_VERSION = fetch_latest_tabler_version
ICON_DEFAULT_STYLE = "outline"
SOURCE = URI.parse("https://raw.githubusercontent.com/tabler/tabler-icons/#{ICON_RELEASE_VERSION}/icons")
...
Like this we are always on the last release.
Best regards
Related issues
Actions