{"id":19907886,"url":"https://github.com/leosunmo/tagver","last_synced_at":"2026-04-21T13:03:38.245Z","repository":{"id":57512311,"uuid":"235669453","full_name":"leosunmo/tagver","owner":"leosunmo","description":"Simple binary to get latest Git SHAs/Branch/Tag with no reliance on Git.","archived":false,"fork":false,"pushed_at":"2025-01-23T12:51:07.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T17:58:04.639Z","etag":null,"topics":["git","go"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leosunmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-22T21:21:36.000Z","updated_at":"2025-01-23T12:45:23.000Z","dependencies_parsed_at":"2024-02-08T11:28:34.629Z","dependency_job_id":"81a937b7-b89e-4d58-9cba-5e6f9cf0ca7b","html_url":"https://github.com/leosunmo/tagver","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosunmo%2Ftagver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosunmo%2Ftagver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosunmo%2Ftagver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leosunmo%2Ftagver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leosunmo","download_url":"https://codeload.github.com/leosunmo/tagver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241335590,"owners_count":19946085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","go"],"created_at":"2024-11-12T20:44:13.021Z","updated_at":"2026-04-21T13:03:33.197Z","avatar_url":"https://github.com/leosunmo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tagver\n\nSimple Go binary that allows you to get latest Git SHAs/Tags (annotated or lightweight) and current Branch.\n\n## Usage\n```\nUsage of tagver: [-t] [-b] [-c] [\u003cgit dir\u003e]\n\nDefault output is very close to \"git describe --tags\" if there's a tag present, otherwise defaults to branch and commit:\n\tIf HEAD is not tagged: \u003cbranch\u003e-\u003cHEAD SHA\u003e (example: main-63380731)\n\tIf HEAD is tagged: \u003ctag\u003e-\u003cHEAD SHA\u003e (example: v1.0.4-63380731)\n\tIf HEAD is tagged but has commits after latest tag: \u003ctag\u003e-\u003ccommits since tag\u003e-\u003cHEAD SHA\u003e (example: v1.0.4-1-5227b593)\n\nIf \"-b\" or \"-c\" are provided with \"-t\", it is additive and will include commits since tag if unclean.\nThe number of commits since tag can be ignored with \"-ignore-unclean-tag\".\n\nPrint order will be \u003ctag\u003e-\u003cbranch\u003e[-\u003ccommits since tag\u003e]-\u003cSHA\u003e.\n\nSet one or more flags.\n  -b\tReturn the current branch\n  -c\tReturn the current commit\n  -ignore-unclean-tag\n    \tReturn only tag name even if the latest tag doesn't point to HEAD (\"v1.0.4\" instead of \"v1.0.4-1-5227b593\")\n  -t\tReturn the latest semver tag (annotated or lightweight Git tag)\n```\n\n## Output\nDefault with tag pointing to HEAD:\n```\ntagver\nv1.0.4-63380731\n```\nDefault with commits after latest tag:\n```\ntagver\nv1.0.4-1-5227b593\n```\nDefault with no tags present:\n```\ntagver\nmain-63380731\n```\nDefault ignoring the fact that there's commits after the latest tag:\n```\ntagver --ignore-unclean-tag\nv1.0.4-5227b593\n```\nOnly display tag, and ignore any commits after the latest tag:\n```\ntagver -t --ignore-unclean-tag\nv1.0.4\n```\n\nAll options provided (ignores the fact that latest tag doesn't point to HEAD):\n```\ntagver -t -b -c\nv1.0.4-main-5227b593\n```\n## Verify signatures and checksums\nThe releases are signed with [cosign](https://github.com/sigstore/cosign). You can verify the signatures and checksums with the following commands.\n\nFirst download the files:\n```sh\nVERSION=\"1.5.4\"\nARCH=x86_64\nOS=Linux\n\n# Download the checksums file and associated certificates and signatures.\nwget https://github.com/leosunmo/tagver/releases/download/v${VERSION}/checksums.txt\nwget https://github.com/leosunmo/tagver/releases/download/v${VERSION}/checksums.txt.pem\nwget https://github.com/leosunmo/tagver/releases/download/v${VERSION}/checksums.txt.sig\n\n# Download the tagver binary and associated certificates and signatures.\nwget https://github.com/leosunmo/tagver/releases/download/v${VERSION}/tagver_${OS}_${ARCH}.tar.gz\nwget https://github.com/leosunmo/tagver/releases/download/v${VERSION}/tagver_${OS}_${ARCH}.tar.gz.pem\nwget https://github.com/leosunmo/tagver/releases/download/v${VERSION}/tagver_${OS}_${ARCH}.tar.gz.sig\n```\n\nThen verify the signatures and checksums:\n```sh\n# Verify the checksums.txt file\ncosign verify-blob checksums.txt --cert checksums.txt.pem --signature checksums.txt.sig \\\n--certificate-oidc-issuer https://token.actions.githubusercontent.com \\\n--certificate-identity-regexp 'https://github\\.com/leosunmo/tagver/\\.github/workflows/build\\.yml@refs/tags/v[0-9]+(\\.[0-9]+){2}'\n\nARCH=x86_64\nOS=Linux\n\n# Verify the tagver binary\ncosign verify-blob tagver_${OS}_${ARCH}.tar.gz --cert tagver_${OS}_${ARCH}.tar.gz.pem --signature tagver_${OS}_${ARCH}.tar.gz.sig \\\n--certificate-oidc-issuer https://token.actions.githubusercontent.com \\\n--certificate-identity-regexp 'https://github\\.com/leosunmo/tagver/\\.github/workflows/build\\.yml@refs/tags/v[0-9]+(\\.[0-9]+){2}'\n\n# Verify the checksums\nsha256sum --ignore-missing -c checksums.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleosunmo%2Ftagver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleosunmo%2Ftagver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleosunmo%2Ftagver/lists"}