diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29a9008..15686b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,15 @@ -# .github/workflows/build.yml name: Build Binaries on: push: tags: - "v*" + workflow_dispatch: # manual trigger + inputs: + version: + description: 'Version tag' + required: true + default: 'v1.0.4' jobs: build: diff --git a/contrib/aur/PKGBUILD b/contrib/aur/PKGBUILD index d67cc3b..a17886b 100644 --- a/contrib/aur/PKGBUILD +++ b/contrib/aur/PKGBUILD @@ -1,7 +1,7 @@ # Mirror only. Canonical source: ssh://aur@aur.archlinux.org/hubfetch.git -# Maintainer: Pranav +# Maintainer: Pranav pranavu8406@gmail.com pkgname=hubfetch -pkgver=1.0.3 +pkgver=1.0.4 pkgrel=1 pkgdesc="A CLI ricing tool designed to fetch GitHub user stats" arch=('any') @@ -10,7 +10,7 @@ license=('MIT') depends=('python' 'python-click' 'python-requests' 'python-rich') makedepends=('python-build' 'python-installer' 'python-wheel' 'python-hatchling') source=("https://files.pythonhosted.org/packages/source/h/hubfetch/hubfetch-$pkgver.tar.gz") -sha256sums=('b9f7faece2cbc7d855bc4ef2d673a9b8e3abeb728d752c075069c5f01f322f72') +sha256sums=('fc737855e34d5c2d70290f261460cf41d6228d1d0c3fd374679517836ec8022e') build() { cd "hubfetch-$pkgver" diff --git a/contrib/homebrew/homebrew.rb b/contrib/homebrew/homebrew.rb index d6c44dd..789fca6 100644 --- a/contrib/homebrew/homebrew.rb +++ b/contrib/homebrew/homebrew.rb @@ -1,18 +1,17 @@ -# Mirror only. Canonical source: https://github.com/PranavU-Coder/homebrew-tap class Hubfetch < Formula include Language::Python::Virtualenv desc "Python CLI tool to check GitHub stats via terminal" homepage "https://github.com/PranavU-Coder/hubfetch" - url "https://files.pythonhosted.org/packages/b6/0e/64e95a784f2b90715a4242dd9d90cbcdabc2e74c528bb9c86baaae86c10a/hubfetch-1.0.3.tar.gz" - sha256 "b9f7faece2cbc7d855bc4ef2d673a9b8e3abeb728d752c075069c5f01f322f72" + url "https://files.pythonhosted.org/packages/df/7a/15d0b9767c9f36e15e20547c932ed8117b6bc7b17f176ee19e023ad02f2d/hubfetch-1.0.4.tar.gz" + sha256 "fc737855e34d5c2d70290f261460cf41d6228d1d0c3fd374679517836ec8022e" license "MIT" depends_on "python@3.14" resource "certifi" do - url "https://files.pythonhosted.org/packages/af/2d/7bf41579a8986e348fa033a31cdd0e4121114f6bce2457e8876010b092dd/certifi-2026.2.25.tar.gz" - sha256 "e887ab5cee78ea814d3472169153c2d12cd43b14bd03329a39a9c6e2e80bfba7" + url "https://files.pythonhosted.org/packages/f3/ce/ee2ecad540810a79593028e88299baeae54d346cc7a0d94b6199988b89b1/certifi-2026.5.20.tar.gz" + sha256 "69dea482ab64caa7b9f6aba1c6bf48bb6a5448d1c0f1b17ab42ad8c763a5344d" end resource "charset-normalizer" do @@ -21,18 +20,18 @@ class Hubfetch < Formula end resource "click" do - url "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz" - sha256 "12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a" + url "https://files.pythonhosted.org/packages/9b/98/518d8e5081007684232226f475082b30087d0f585e8457db087298259f49/click-8.4.1.tar.gz" + sha256 "918b5633eddf6b41c32d4f454bf0de810065c74e3f7dbf8ee5452f8be88d3e96" end resource "idna" do - url "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz" - sha256 "795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902" + url "https://files.pythonhosted.org/packages/1a/88/bcf9709822fe69d02c2a6a77956c98ce6ea8ca8767a9aadcedc7eb6a2390/idna-3.16.tar.gz" + sha256 "d7a6da03db833450fca25d2358ac9ff06cd624577a4aea3a596d5c0f77b8e03d" end resource "markdown-it-py" do - url "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz" - sha256 "cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3" + url "https://files.pythonhosted.org/packages/06/ff/7841249c247aa650a76b9ee4bbaeae59370dc8bfd2f6c01f3630c35eb134/markdown_it_py-4.2.0.tar.gz" + sha256 "04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49" end resource "mdurl" do @@ -46,18 +45,18 @@ class Hubfetch < Formula end resource "requests" do - url "https://files.pythonhosted.org/packages/5f/a4/98b9c7c6428a668bf7e42ebb7c79d576a1c3c1e3ae2d47e674b468388871/requests-2.33.1.tar.gz" - sha256 "18817f8c57c6263968bc123d237e3b8b08ac046f5456bd1e307ee8f4250d3517" + url "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz" + sha256 "f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed" end resource "rich" do - url "https://files.pythonhosted.org/packages/b3/c6/f3b320c27991c46f43ee9d856302c70dc2d0fb2dba4842ff739d5f46b393/rich-14.3.3.tar.gz" - sha256 "b8daa0b9e4eef54dd8cf7c86c03713f53241884e814f4e2f5fb342fe520f639b" + url "https://files.pythonhosted.org/packages/c0/8f/0722ca900cc807c13a6a0c696dacf35430f72e0ec571c4275d2371fca3e9/rich-15.0.0.tar.gz" + sha256 "edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36" end resource "urllib3" do - url "https://files.pythonhosted.org/packages/c7/24/5f1b3bdffd70275f6661c76461e25f024d5a38a46f04aaca912426a2b1d3/urllib3-2.6.3.tar.gz" - sha256 "1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed" + url "https://files.pythonhosted.org/packages/53/0c/06f8b233b8fd13b9e5ee11424ef85419ba0d8ba0b3138bf360be2ff56953/urllib3-2.7.0.tar.gz" + sha256 "231e0ec3b63ceb14667c67be60f2f2c40a518cb38b03af60abc813da26505f4c" end def install diff --git a/contrib/scoop/hubfetch.json b/contrib/scoop/hubfetch.json index 1ad31f0..f82a0ff 100644 --- a/contrib/scoop/hubfetch.json +++ b/contrib/scoop/hubfetch.json @@ -1,11 +1,11 @@ { - "version": "1.0.3", + "version": "1.0.4", "description": "CLI tool to fetch and visualize your GitHub stats in the terminal.", "homepage": "https://github.com/PranavU-Coder/hubfetch", "license": "MIT", "notes": "Run 'hubfetch auth' to set up your GitHub Personal Access Token before first use.", - "url": "https://github.com/PranavU-Coder/hubfetch/releases/download/v1.0.3/hubfetch.exe", - "hash": "d06c4d19189ecd361151559901e75ba464c1fa5a973f56a18f282b71e6216f0e", + "url": "https://github.com/PranavU-Coder/hubfetch/releases/download/v1.0.4/hubfetch.exe", + "hash": "", "bin": "hubfetch.exe", "checkver": "github", "autoupdate": { diff --git a/hubfetch/cache.py b/hubfetch/cache.py index 358174e..e4bad72 100644 --- a/hubfetch/cache.py +++ b/hubfetch/cache.py @@ -52,10 +52,8 @@ def ensure_avatar(username: str, current_avatar_url: str) -> Path | None: dest = avatar_path(username) meta = _load_json(META_FILE) now = datetime.now(timezone.utc).isoformat() - cached_url = meta.get("avatar_url") last_checked_raw = meta.get("avatar_last_checked") - # first run if not dest.exists() or not last_checked_raw: if _download_avatar(current_avatar_url, dest): meta.update({"avatar_url": current_avatar_url, "avatar_last_checked": now}) @@ -63,13 +61,10 @@ def ensure_avatar(username: str, current_avatar_url: str) -> Path | None: return dest return None - # within 6 hours, serve from disk if not _is_stale(last_checked_raw, AVATAR_REFRESH): return dest - - # past 6 hours, re-download only if URL changed - if current_avatar_url != cached_url: - _download_avatar(current_avatar_url, dest) + # turns out GitHub avatar urls don't change so fuck this shit honestly + _download_avatar(current_avatar_url, dest) meta.update({"avatar_url": current_avatar_url, "avatar_last_checked": now}) _save_json(META_FILE, meta) diff --git a/pyproject.toml b/pyproject.toml index 1e1a8b8..6513c89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "hubfetch" -version = "1.0.3" +version = "1.0.4" description = "A CLI ricing tool designed to fetch GitHub user stats" readme = "README.md" requires-python = ">=3.14" diff --git a/uv.lock b/uv.lock index f8a7cf3..142a483 100644 --- a/uv.lock +++ b/uv.lock @@ -163,7 +163,7 @@ wheels = [ [[package]] name = "hubfetch" -version = "1.0.3" +version = "1.0.4" source = { editable = "." } dependencies = [ { name = "click" },