-- Leo's gemini proxy

-- Connecting to gmi.osiux.com:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=es_AR

`git-tag-summary` vs `git-tag-readme`


AUTHOR: Osiris Alejandro Gomez

EMAIL: osiux@osiux.com

DATE: 2023-06-08 19:42


[IMG]

[1]


aprovechar los *tags* de *git*


Varios de mis repositorios `Git` ^1[2] no tenían mucha documentación y por ello para contar con algo, que por un lado sea útil y que no me lleve mucho tiempo generar, se me ocurrió crear un *script* para automatizar la tarea de contar con un resumen de todos los *tags*.


Teniendo la disciplina de escribir un resumen del *tag* al momento de generarlo, basta con ejecutar `git tag -n` para contar con la data útil:


# git tag -n

v0.1.0          first public version
v0.2.0          fix dont ignore title and description in mr new
v0.3.0          add shellcheck in gitlab-ci using koalaman/shellcheck-alpine image
v0.4.0          set reviewer with default reviewer or assignee when default is empty in gl-mr-new

`git-tag-summary`


Para ponerle un poco de onda, `git-tag-summary` ^2[3] se ocupa de agregar la fecha del *tag* y por defecto arma un *link* del *tag* a un documento con formato `nombre-repo-tag.md` y todo en forma de tabla `Markdown` ^3[4]


# git-tag-summary

| _date_     | _tag_                                       | _description_                                                                     |
|------------|---------------------------------------------|-----------------------------------------------------------------------------------|
| 2022-08-20 | [`  v0.4.0`](gitlab-bash-utils-v0.4.0.md)   | set reviewer with default reviewer or assignee when default is empty in gl-mr-new |
| 2022-08-20 | [`  v0.3.0`](gitlab-bash-utils-v0.3.0.md)   | add shellcheck in gitlab-ci using koalaman/shellcheck-alpine image                |
| 2022-08-04 | [`  v0.2.0`](gitlab-bash-utils-v0.2.0.md)   | fix dont ignore title and description in mr new                                   |
| 2022-08-04 | [`  v0.1.0`](gitlab-bash-utils-v0.1.0.md)   | first public version                                                              |

Si no necesitamos un *link* basta con definir la variable de entorno `NO_TAG_LINK=1` y el resultado se simplifica:


# NO_TAG_LINK=1 git-tag-summary

| _date_     | _tag_      | _description_                                                                     |
|------------|------------|-----------------------------------------------------------------------------------|
| 2022-08-20 | `  v0.4.0` | set reviewer with default reviewer or assignee when default is empty in gl-mr-new |
| 2022-08-20 | `  v0.3.0` | add shellcheck in gitlab-ci using koalaman/shellcheck-alpine image                |
| 2022-08-04 | `  v0.2.0` | fix dont ignore title and description in mr new                                   |
| 2022-08-04 | `  v0.1.0` | first public version                                                              |

La salida *renderizada* es la siguiente:


┌────────────┬──────────┬──────────────────────────────────────────────────────┐
│   *date*   │  *tag*   │                    *description*                     │
╞════════════╪══════════╪══════════════════════════════════════════════════════╡
│ 2022-08-20 │ `v0.4.0` │ set reviewer with default reviewer or assignee when  │
│            │          │ default is empty in gl-mr-new                        │
├────────────┼──────────┼──────────────────────────────────────────────────────┤
│ 2022-08-20 │ `v0.3.0` │ add shellcheck in gitlab-ci using                    │
│            │          │ koalaman/shellcheck-alpine image                     │
├────────────┼──────────┼──────────────────────────────────────────────────────┤
│ 2022-08-04 │ `v0.2.0` │ fix dont ignore title and description in mr new      │
├────────────┼──────────┼──────────────────────────────────────────────────────┤
│ 2022-08-04 │ `v0.1.0` │ first public version                                 │
└────────────┴──────────┴──────────────────────────────────────────────────────┘

`git-tag-readme`


Aprovechando la salida de `git-tag-summary`, fui por más y generé el *script* `git-tag-readme` ^4[5] que en un *repo* vacío se ocupa de auto-genera un `README.md` básico, con la descripción del proyecto (en base al archivo `.description`), el resumen de los *tags*, agregando la información del autor y la licencia desde variables (por defecto `OSiUX` y `GPLv3` ^5[6]) y en caso de existir `.readme-header` y/o `.readme-footer` los incluye y descarta info auto-generada.


El resultado para el *repo* `gitlab-bash-utils` ^6[7] es el siguiente:


# `gitlab-bash-utils`

Useful bash scripts for various gitlab utils.

## _Tags Summary_

| _date_     | _tag_      | _description_                                                                     |
|------------|------------|-----------------------------------------------------------------------------------|
| 2022-08-20 | `  v0.4.0` | set reviewer with default reviewer or assignee when default is empty in gl-mr-new |
| 2022-08-20 | `  v0.3.0` | add shellcheck in gitlab-ci using koalaman/shellcheck-alpine image                |
| 2022-08-04 | `  v0.2.0` | fix dont ignore title and description in mr new                                   |
| 2022-08-04 | `  v0.1.0` | first public version                                                              |

## License

GNU General Public License, GPLv3.

## Author Information

This repo was created in 2022 by
[Osiris Alejandro Gómez](https://osiux.com/), worker cooperative of
[gcoop Cooperativa de Software Libre](https://www.gcoop.coop/).

De esta manera, ahora puedo contar un `README.md` en cada uno de mis *repos* sin mucho esfuerzo y con la posibilidad de actualizarlos fácilmente cada vez que genero un nuevo *tag* `:)`


Seguramente, en el futuro agregaré funcionalidades extra!


Tal vez te interese leer


`git-tag-changelog`[8]

Regenerar el archivo de configuración `.git/config` de un repositorio git[9]

find value in all git tags using `git-find-value`[10]

git auto commit and push using crontab.gmi[11]

Cómo configurar tokens de acceso personal a los repositorios de Git usando HTTPS[12]

cómo escribir rápidamente mensajes de commit de git usando vim[13]

cómo usar *GitLab* desde la línea de comandos[14]

git commit timesum[15]

cambiar la fecha de un *commit* usando `GIT_COMMITER_DATE`[16]


ChangeLog


`2023-06-08 20:13`[17] agregar `git-tag-summary` vs `git-tag-readme`


1: file:img/git-tag-summary-vs-git-tag-readme.png

2: https://git-scm.com/

3: https://gitlab.com/osiux/git-bash-utils/-/raw/develop/git-tag-summary

4: https://en.wikipedia.gmi/wiki/Markdown

5: https://gitlab.com/osiux/git-bash-utils/-/raw/develop/git-tag-readme

6: https://en.wikipedia.gmi/wiki/GNU_General_Public_License

7: https://gitlab.com/osiux/gitlab-bash-utils/

8: 2023-05-25-git-tag-changelog.gmi

9: 2023-05-18-howto-regenerate-git-config-from-multiples-repositories-using-git-bash-utils.gmi

10: 2023-03-07-find-value-in-all-git-tags-using-git-find-value.gmi

11: 2023-02-27-git-auto-commit-and-push-using-crontab.gmi

12: 2022-11-22-howto-configure-personal-access-tokens-to-git-repositories-using-https.gmi

13: 2022-11-21-howto-quickly-write-git-commit-messages-using-vim.gmi

14: 2022-08-21-howto-use-gitlab-from-command-line.gmi

15: 2021-03-18-git-commit-timesum.gmi

16: 2021-03-09-git-commiter-date.gmi

17: https://gitlab.com/osiux/osiux.gitlab.io/-/commit/f6a648e1cbd778ade1c21f5bdb676b3b7f0b1c2a

-- Response ended

-- Page fetched on Thu May 2 11:42:40 2024