Extract Tailwind release helpers

This commit is contained in:
Claudio Ortolina
2025-03-09 09:22:48 +00:00
parent be7231f5aa
commit b23e2fd1a5
3 changed files with 36 additions and 32 deletions
+4 -11
View File
@@ -8,19 +8,12 @@ defmodule Mix.Tasks.Tailwind.CheckVersion do
Exits with 0 if versions match, 1 if the Tailwind needs to be updated.
"""
alias Mix.Tasks.Tailwind.Release
@impl Mix.Task
def run(_args) do
Application.ensure_all_started(:req)
current_version =
Application.get_env(:tailwind, :version)
latest_version_url =
"https://api.github.com/repos/tailwindlabs/tailwindcss/releases/latest"
latest_version =
Req.get!(latest_version_url).body["tag_name"]
|> String.replace_prefix("v", "")
current_version = Release.fetch_current_version()
latest_version = Release.fetch_latest_version!()
if current_version !== latest_version do
Mix.Shell.IO.info(